iget: stop ISOFS from using read_inode()
Stop the ISOFS filesystem from using read_inode(). Make isofs_read_inode() return an error code, and make isofs_iget() pass it on. Signed-off-by: David Howells <dhowells@redhat.com> Cc: Jan Kara <jack@ucw.cz> Acked-by: Christoph Hellwig <hch@lst.de> Cc: "Dave Young" <hidave.darkstar@gmail.com> 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
635253915b
commit
c4386c83bf
@ -26,11 +26,9 @@ isofs_export_iget(struct super_block *sb,
|
||||
if (block == 0)
|
||||
return ERR_PTR(-ESTALE);
|
||||
inode = isofs_iget(sb, block, offset);
|
||||
if (inode == NULL)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
if (is_bad_inode(inode)
|
||||
|| (generation && inode->i_generation != generation))
|
||||
{
|
||||
if (IS_ERR(inode))
|
||||
return ERR_CAST(inode);
|
||||
if (generation && inode->i_generation != generation) {
|
||||
iput(inode);
|
||||
return ERR_PTR(-ESTALE);
|
||||
}
|
||||
@ -110,8 +108,10 @@ static struct dentry *isofs_export_get_parent(struct dentry *child)
|
||||
parent_inode = isofs_iget(child_inode->i_sb,
|
||||
parent_block,
|
||||
parent_offset);
|
||||
if (parent_inode == NULL) {
|
||||
rv = ERR_PTR(-EACCES);
|
||||
if (IS_ERR(parent_inode)) {
|
||||
rv = ERR_CAST(parent_inode);
|
||||
if (rv != ERR_PTR(-ENOMEM))
|
||||
rv = ERR_PTR(-EACCES);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user