diff options
author | David Howells <dhowells@redhat.com> | 2008-02-07 03:15:41 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-07 11:42:28 -0500 |
commit | c4386c83bf849c56b1f49951595aeb7c9a719d21 (patch) | |
tree | 44248ee7c540d9992fc3c0b4ac73d30c0bc0a136 /fs/isofs/export.c | |
parent | 635253915b3297435e178371407d568522aae3d4 (diff) |
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.c | 14 |
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, | |||
26 | if (block == 0) | 26 | if (block == 0) |
27 | return ERR_PTR(-ESTALE); | 27 | return ERR_PTR(-ESTALE); |
28 | inode = isofs_iget(sb, block, offset); | 28 | inode = isofs_iget(sb, block, offset); |
29 | if (inode == NULL) | 29 | if (IS_ERR(inode)) |
30 | return ERR_PTR(-ENOMEM); | 30 | return ERR_CAST(inode); |
31 | if (is_bad_inode(inode) | 31 | if (generation && inode->i_generation != generation) { |
32 | || (generation && inode->i_generation != generation)) | ||
33 | { | ||
34 | iput(inode); | 32 | iput(inode); |
35 | return ERR_PTR(-ESTALE); | 33 | return ERR_PTR(-ESTALE); |
36 | } | 34 | } |
@@ -110,8 +108,10 @@ static struct dentry *isofs_export_get_parent(struct dentry *child) | |||
110 | parent_inode = isofs_iget(child_inode->i_sb, | 108 | parent_inode = isofs_iget(child_inode->i_sb, |
111 | parent_block, | 109 | parent_block, |
112 | parent_offset); | 110 | parent_offset); |
113 | if (parent_inode == NULL) { | 111 | if (IS_ERR(parent_inode)) { |
114 | rv = ERR_PTR(-EACCES); | 112 | rv = ERR_CAST(parent_inode); |
113 | if (rv != ERR_PTR(-ENOMEM)) | ||
114 | rv = ERR_PTR(-EACCES); | ||
115 | goto out; | 115 | goto out; |
116 | } | 116 | } |
117 | 117 | ||