diff options
author | David Howells <dhowells@redhat.com> | 2008-02-07 03:15:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-07 11:42:27 -0500 |
commit | e33ab086ae227a34e34b17e86dbb9d2dbaebb489 (patch) | |
tree | 02d5d6d90b0aad2032085bbdba07e69edbe9378f /fs/bfs/dir.c | |
parent | 96eb5419412fbc7f39fa45d987034c5d0e6e1202 (diff) |
iget: stop BFS from using iget() and read_inode()
Stop the BFS filesystem from using iget() and read_inode(). Replace
bfs_read_inode() with bfs_iget(), and call that instead of iget(). bfs_iget()
then uses iget_locked() directly and returns a proper error code instead of an
inode in the event of an error.
bfs_fill_super() returns any error incurred when getting the root inode
instead of EINVAL.
[kamalesh@linux.vnet.ibm.com: build fix]
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/bfs/dir.c')
-rw-r--r-- | fs/bfs/dir.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c index 1fd056d0fc3d..034950cb3cbe 100644 --- a/fs/bfs/dir.c +++ b/fs/bfs/dir.c | |||
@@ -148,10 +148,10 @@ static struct dentry *bfs_lookup(struct inode *dir, struct dentry *dentry, | |||
148 | if (bh) { | 148 | if (bh) { |
149 | unsigned long ino = (unsigned long)le16_to_cpu(de->ino); | 149 | unsigned long ino = (unsigned long)le16_to_cpu(de->ino); |
150 | brelse(bh); | 150 | brelse(bh); |
151 | inode = iget(dir->i_sb, ino); | 151 | inode = bfs_iget(dir->i_sb, ino); |
152 | if (!inode) { | 152 | if (IS_ERR(inode)) { |
153 | unlock_kernel(); | 153 | unlock_kernel(); |
154 | return ERR_PTR(-EACCES); | 154 | return ERR_CAST(inode); |
155 | } | 155 | } |
156 | } | 156 | } |
157 | unlock_kernel(); | 157 | unlock_kernel(); |