]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ROMFS: Fix up an error in iget removal
authorDavid Howells <dhowells@redhat.com>
Thu, 20 Mar 2008 00:00:50 +0000 (17:00 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Mar 2008 01:53:36 +0000 (18:53 -0700)
commit4ebf89845bea44a164d1fbb8fa319379ec7132de
treef5b87ddbf858ee0a1d9f0177a0c058b81f352c45
parentc587f0c0a69227587baaa12e75815b6644457c0a
ROMFS: Fix up an error in iget removal

Fix up an error in iget removal in which romfs_lookup() making a successful
call to romfs_iget() continues through the negative/error handling (previously
the successful case jumped around the negative/error handling case):

 (1) inode is initialised to NULL at the top of the function, eliminating the
     need for specific negative-inode handling.  This means the positive
     success handling now flows straight through.

 (2) Rename the labels to be clearer about what they mean.

Also make romfs_lookup()'s result variable of type long so as to avoid
32-bit/64-bit conversions with PTR_ERR() and friends.

Based upon a report and patch from Adam Richter.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: "Adam J. Richter" <adam@yggdrasil.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/romfs/inode.c