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 <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>
This commit is contained in:

committed by
Linus Torvalds

parent
eab1df71a0
commit
a90a088021
@@ -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;
|
||||
|
Reference in New Issue
Block a user