Commit:     4b41bd85d5f93af37c2730df172aeb54280be7c3
Parent:     e57101991156aaba97c630f38e880f0d4012edcd
Author:     J.Bruce Fields <[EMAIL PROTECTED]>
AuthorDate: Wed Dec 13 00:35:21 2006 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Dec 13 09:05:53 2006 -0800

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 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 f37df46..0747bb5 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)
                 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;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to