diff options
author | J.Bruce Fields <bfields@fieldses.org> | 2006-12-13 03:35:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-13 12:05:53 -0500 |
commit | 4b41bd85d5f93af37c2730df172aeb54280be7c3 (patch) | |
tree | 2560c8645658706c386dddb498c6a824cfa2345b /fs/nfsd | |
parent | e57101991156aaba97c630f38e880f0d4012edcd (diff) |
[PATCH] knfsd: nfsd: make exp_rootfh handle exp_parent errors
Since exp_parent can fail by returning an error (-EAGAIN) in addition to by
returning NULL, we should check for that case in exp_rootfh.
(TODO: we should check that userland handles these errors too.)
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/export.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index f37df46d2eaa..0747bb5ffcf1 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c | |||
@@ -1104,6 +1104,10 @@ exp_rootfh(svc_client *clp, char *path, struct knfsd_fh *f, int maxsize) | |||
1104 | path, nd.dentry, clp->name, | 1104 | path, nd.dentry, clp->name, |
1105 | inode->i_sb->s_id, inode->i_ino); | 1105 | inode->i_sb->s_id, inode->i_ino); |
1106 | exp = exp_parent(clp, nd.mnt, nd.dentry, NULL); | 1106 | exp = exp_parent(clp, nd.mnt, nd.dentry, NULL); |
1107 | if (IS_ERR(exp)) { | ||
1108 | err = PTR_ERR(exp); | ||
1109 | goto out; | ||
1110 | } | ||
1107 | if (!exp) { | 1111 | if (!exp) { |
1108 | dprintk("nfsd: exp_rootfh export not found.\n"); | 1112 | dprintk("nfsd: exp_rootfh export not found.\n"); |
1109 | goto out; | 1113 | goto out; |