diff options
author | David Howells <dhowells@redhat.com> | 2008-02-07 03:15:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-07 11:42:27 -0500 |
commit | ce634ab28e7dbcc13ebe6e7bc5bc7de4f8def4c8 (patch) | |
tree | cb19d7c04a3f503f8f1c026c861a3f21b5283e2b /fs/cifs/cifsfs.c | |
parent | e33ab086ae227a34e34b17e86dbb9d2dbaebb489 (diff) |
iget: stop CIFS from using iget() and read_inode()
Stop the CIFS filesystem from using iget() and read_inode(). Replace
cifs_read_inode() with cifs_iget(), and call that instead of iget().
cifs_iget() then uses iget_locked() directly and returns a proper error code
instead of an inode in the event of an error.
cifs_read_super() now returns any error incurred when getting the root inode
instead of ENOMEM.
cifs_iget() needs examining. The comment "can not call macro FreeXid here
since in a void func" is no longer true.
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Steven French <sfrench@us.ibm.com>
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/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index e9f4ec701092..fcc434227691 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -147,10 +147,11 @@ cifs_read_super(struct super_block *sb, void *data, | |||
147 | #endif | 147 | #endif |
148 | sb->s_blocksize = CIFS_MAX_MSGSIZE; | 148 | sb->s_blocksize = CIFS_MAX_MSGSIZE; |
149 | sb->s_blocksize_bits = 14; /* default 2**14 = CIFS_MAX_MSGSIZE */ | 149 | sb->s_blocksize_bits = 14; /* default 2**14 = CIFS_MAX_MSGSIZE */ |
150 | inode = iget(sb, ROOT_I); | 150 | inode = cifs_iget(sb, ROOT_I); |
151 | 151 | ||
152 | if (!inode) { | 152 | if (IS_ERR(inode)) { |
153 | rc = -ENOMEM; | 153 | rc = PTR_ERR(inode); |
154 | inode = NULL; | ||
154 | goto out_no_root; | 155 | goto out_no_root; |
155 | } | 156 | } |
156 | 157 | ||
@@ -520,7 +521,6 @@ static int cifs_remount(struct super_block *sb, int *flags, char *data) | |||
520 | } | 521 | } |
521 | 522 | ||
522 | static const struct super_operations cifs_super_ops = { | 523 | static const struct super_operations cifs_super_ops = { |
523 | .read_inode = cifs_read_inode, | ||
524 | .put_super = cifs_put_super, | 524 | .put_super = cifs_put_super, |
525 | .statfs = cifs_statfs, | 525 | .statfs = cifs_statfs, |
526 | .alloc_inode = cifs_alloc_inode, | 526 | .alloc_inode = cifs_alloc_inode, |