summaryrefslogtreecommitdiffstats
path: root/fs/isofs/export.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2008-02-07 09:15:41 +0100
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-07 17:42:28 +0100
commitc4386c83bf849c56b1f49951595aeb7c9a719d21 (patch)
tree44248ee7c540d9992fc3c0b4ac73d30c0bc0a136 /fs/isofs/export.c
parentiget: stop HFSPLUS from using iget() and read_inode() (diff)
downloadlinux-c4386c83bf849c56b1f49951595aeb7c9a719d21.tar.xz
linux-c4386c83bf849c56b1f49951595aeb7c9a719d21.zip
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>
Diffstat (limited to 'fs/isofs/export.c')
-rw-r--r--fs/isofs/export.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/isofs/export.c b/fs/isofs/export.c
index 29f9753ae5e5..bb219138331a 100644
--- a/fs/isofs/export.c
+++ b/fs/isofs/export.c
@@ -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;
}