Skip to content

Commit

Permalink
[PATCH] knfsd: nfsd: make exp_rootfh handle exp_parent errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
J.Bruce Fields authored and Linus Torvalds committed Dec 13, 2006
1 parent e571019 commit 4b41bd8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/nfsd/export.c
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,10 @@ exp_rootfh(svc_client *clp, char *path, struct knfsd_fh *f, int maxsize)
path, nd.dentry, clp->name,
inode->i_sb->s_id, inode->i_ino);
exp = exp_parent(clp, nd.mnt, nd.dentry, NULL);
if (IS_ERR(exp)) {
err = PTR_ERR(exp);
goto out;
}
if (!exp) {
dprintk("nfsd: exp_rootfh export not found.\n");
goto out;
Expand Down

0 comments on commit 4b41bd8

Please sign in to comment.