From a90a088021f8f1e9a9cd83f06ac90e1f3aada4d4 Mon Sep 17 00:00:00 2001 From: David Howells Date: Thu, 7 Feb 2008 00:15:44 -0800 Subject: iget: stop the MINIX filesystem from using iget() and read_inode() Stop the MINIX filesystem from using iget() and read_inode(). Replace minix_read_inode() with minix_iget(), and call that instead of iget(). minix_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. minix_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 Acked-by: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/minix/namei.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'fs/minix/namei.c') diff --git a/fs/minix/namei.c b/fs/minix/namei.c index f4aa7a9..102241b 100644 --- a/fs/minix/namei.c +++ b/fs/minix/namei.c @@ -54,10 +54,9 @@ static struct dentry *minix_lookup(struct inode * dir, struct dentry *dentry, st ino = minix_inode_by_name(dentry); if (ino) { - inode = iget(dir->i_sb, ino); - - if (!inode) - return ERR_PTR(-EACCES); + inode = minix_iget(dir->i_sb, ino); + if (IS_ERR(inode)) + return ERR_CAST(inode); } d_add(dentry, inode); return NULL; -- cgit v1.1