summaryrefslogtreecommitdiffstats
path: root/fs/ufs/namei.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2008-02-07 09:15:48 +0100
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-07 17:42:29 +0100
commitb55c460da6df4e8dfc6f68c00fafe7337b54e2f8 (patch)
treeef38152ff42e3a50a9e193cd66bd81107d58a2e4 /fs/ufs/namei.c
parentiget: stop the SYSV filesystem from using iget() and read_inode() (diff)
downloadlinux-b55c460da6df4e8dfc6f68c00fafe7337b54e2f8.tar.xz
linux-b55c460da6df4e8dfc6f68c00fafe7337b54e2f8.zip
iget: stop UFS from using iget() and read_inode()
Stop the UFS filesystem from using iget() and read_inode(). Replace ufs_read_inode() with ufs_iget(), and call that instead of iget(). ufs_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. ufs_fill_super() returns any error incurred when getting the root inode instead of EINVAL. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: David Howells <dhowells@redhat.com> Cc: Evgeniy Dushistov <dushistov@mail.ru> 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/ufs/namei.c')
-rw-r--r--fs/ufs/namei.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c
index d8bfbee2fe2b..747a4de6c695 100644
--- a/fs/ufs/namei.c
+++ b/fs/ufs/namei.c
@@ -57,10 +57,10 @@ static struct dentry *ufs_lookup(struct inode * dir, struct dentry *dentry, stru
lock_kernel();
ino = ufs_inode_by_name(dir, dentry);
if (ino) {
- inode = iget(dir->i_sb, ino);
- if (!inode) {
+ inode = ufs_iget(dir->i_sb, ino);
+ if (IS_ERR(inode)) {
unlock_kernel();
- return ERR_PTR(-EACCES);
+ return ERR_CAST(inode);
}
}
unlock_kernel();