From c4ce1b30407b5aa8ed073e0a25148895b4d05f3d Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Wed, 4 Jan 2012 16:26:43 -0500 Subject: [PATCH] --- yaml --- r: 284649 b: refs/heads/master c: 9b4146e85536ebd6b989f43906986e34486efdba h: refs/heads/master i: 284647: ac0288cc5b124f79407257efeaa3833a2a717358 v: v3 --- [refs] | 2 +- trunk/fs/nfsd/vfs.c | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index bf3a7fa029e7..77f237bd2b32 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9689dcce0b456793c46bdeea7a79adfab1bc9c5d +refs/heads/master: 9b4146e85536ebd6b989f43906986e34486efdba diff --git a/trunk/fs/nfsd/vfs.c b/trunk/fs/nfsd/vfs.c index 7a2e442623c8..896891306215 100644 --- a/trunk/fs/nfsd/vfs.c +++ b/trunk/fs/nfsd/vfs.c @@ -594,8 +594,19 @@ nfsd4_get_nfs4_acl(struct svc_rqst *rqstp, struct dentry *dentry, struct nfs4_ac return error; } -#define NFSD_XATTR_JUNCTION_PREFIX XATTR_TRUSTED_PREFIX "junction." -#define NFSD_XATTR_JUNCTION_TYPE NFSD_XATTR_JUNCTION_PREFIX "type" +/* + * NFS junction information is stored in an extended attribute. + */ +#define NFSD_JUNCTION_XATTR_NAME XATTR_TRUSTED_PREFIX "junction.nfs" + +/** + * nfsd4_is_junction - Test if an object could be an NFS junction + * + * @dentry: object to test + * + * Returns 1 if "dentry" appears to contain NFS junction information. + * Otherwise 0 is returned. + */ int nfsd4_is_junction(struct dentry *dentry) { struct inode *inode = dentry->d_inode; @@ -606,7 +617,7 @@ int nfsd4_is_junction(struct dentry *dentry) return 0; if (!(inode->i_mode & S_ISVTX)) return 0; - if (vfs_getxattr(dentry, NFSD_XATTR_JUNCTION_TYPE, NULL, 0) <= 0) + if (vfs_getxattr(dentry, NFSD_JUNCTION_XATTR_NAME, NULL, 0) <= 0) return 0; return 1; }