aboutsummaryrefslogtreecommitdiffstats
path: root/fs/qnx4/namei.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2008-02-07 03:15:45 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-07 11:42:28 -0500
commit2b7e5bcbd9e03f7236d2869f4261059074ea50a2 (patch)
treefcc75f21bf6a3a65ee28909919bf36f58d667720 /fs/qnx4/namei.c
parenta1d4aebbfa91c55a6b0c629a9ccf6369be0c6e95 (diff)
iget: stop QNX4 from using iget() and read_inode()
Stop the QNX4 filesystem from using iget() and read_inode(). Replace qnx4_read_inode() with qnx4_iget(), and call that instead of iget(). qnx4_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. qnx4_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> Cc: Anders Larsen <al@alarsen.net> 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>
Diffstat (limited to 'fs/qnx4/namei.c')
-rw-r--r--fs/qnx4/namei.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/qnx4/namei.c b/fs/qnx4/namei.c
index 733cdf01d645..775eed3a4085 100644
--- a/fs/qnx4/namei.c
+++ b/fs/qnx4/namei.c
@@ -128,10 +128,12 @@ struct dentry * qnx4_lookup(struct inode *dir, struct dentry *dentry, struct nam
128 } 128 }
129 brelse(bh); 129 brelse(bh);
130 130
131 if ((foundinode = iget(dir->i_sb, ino)) == NULL) { 131 foundinode = qnx4_iget(dir->i_sb, ino);
132 if (IS_ERR(foundinode)) {
132 unlock_kernel(); 133 unlock_kernel();
133 QNX4DEBUG(("qnx4: lookup->iget -> NULL\n")); 134 QNX4DEBUG(("qnx4: lookup->iget -> error %ld\n",
134 return ERR_PTR(-EACCES); 135 PTR_ERR(foundinode)));
136 return ERR_CAST(foundinode);
135 } 137 }
136out: 138out:
137 unlock_kernel(); 139 unlock_kernel();