summaryrefslogtreecommitdiffstats
path: root/fs/sysv/namei.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2008-02-07 09:15:47 +0100
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-07 17:42:29 +0100
commitb8e1343f67460554ca5321956c440cc064e9889b (patch)
tree91611e8ab0d1f486186de660059f10506ff75690 /fs/sysv/namei.c
parentiget: stop ROMFS from using iget() and read_inode() (diff)
downloadlinux-b8e1343f67460554ca5321956c440cc064e9889b.tar.xz
linux-b8e1343f67460554ca5321956c440cc064e9889b.zip
iget: stop the SYSV filesystem from using iget() and read_inode()
Stop the SYSV filesystem from using iget() and read_inode(). Replace sysv_read_inode() with sysv_iget(), and call that instead of iget(). sysv_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/sysv/namei.c')
-rw-r--r--fs/sysv/namei.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/sysv/namei.c b/fs/sysv/namei.c
index 6bd850b7641a..a1f1ef33e81c 100644
--- a/fs/sysv/namei.c
+++ b/fs/sysv/namei.c
@@ -53,9 +53,9 @@ static struct dentry *sysv_lookup(struct inode * dir, struct dentry * dentry, st
ino = sysv_inode_by_name(dentry);
if (ino) {
- inode = iget(dir->i_sb, ino);
- if (!inode)
- return ERR_PTR(-EACCES);
+ inode = sysv_iget(dir->i_sb, ino);
+ if (IS_ERR(inode))
+ return ERR_CAST(inode);
}
d_add(dentry, inode);
return NULL;