From fb8032256dd9d3a6965a11a7077dd3c564765cf5 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 30 Jan 2010 16:11:21 -0500 Subject: [PATCH] --- yaml --- r: 185715 b: refs/heads/master c: 462d60577a997aa87c935ae4521bd303733a9f2b h: refs/heads/master i: 185713: fe5f910e05df09fe683a100fd5d796bc4a6db81f 185711: 798dcf01effec7183e6e1261eb7d4e9262378329 v: v3 --- [refs] | 2 +- trunk/fs/nfsd/nfs4xdr.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index ee3383e301f1..2b81e2fd0942 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3088dd7080d1ecc6d18c27ef9e617cbbd2a2e51e +refs/heads/master: 462d60577a997aa87c935ae4521bd303733a9f2b diff --git a/trunk/fs/nfsd/nfs4xdr.c b/trunk/fs/nfsd/nfs4xdr.c index a8587e90fd5a..bbf72d8f9fc0 100644 --- a/trunk/fs/nfsd/nfs4xdr.c +++ b/trunk/fs/nfsd/nfs4xdr.c @@ -2121,9 +2121,15 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp, * and this is the root of a cross-mounted filesystem. */ if (ignore_crossmnt == 0 && - exp->ex_path.mnt->mnt_root->d_inode == dentry->d_inode) { - err = vfs_getattr(exp->ex_path.mnt->mnt_parent, - exp->ex_path.mnt->mnt_mountpoint, &stat); + dentry == exp->ex_path.mnt->mnt_root) { + struct path path = exp->ex_path; + path_get(&path); + while (follow_up(&path)) { + if (path.dentry != path.mnt->mnt_root) + break; + } + err = vfs_getattr(path.mnt, path.dentry, &stat); + path_put(&path); if (err) goto out_nfserr; }