From: J.Bruce Fields 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 Signed-off-by: Neil Brown Signed-off-by: Andrew Morton --- fs/nfsd/export.c | 4 ++++ 1 files changed, 4 insertions(+) diff -puN fs/nfsd/export.c~knfsd-nfsd-make-exp_rootfh-handle-exp_parent-errors fs/nfsd/export.c --- a/fs/nfsd/export.c~knfsd-nfsd-make-exp_rootfh-handle-exp_parent-errors +++ a/fs/nfsd/export.c @@ -1104,6 +1104,10 @@ exp_rootfh(svc_client *clp, char *path, 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; _