diff options
Diffstat (limited to 'fs/nfsd/vfs.c')
-rw-r--r-- | fs/nfsd/vfs.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index d25a723b68ad..edf6d3ed8777 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -594,8 +594,19 @@ nfsd4_get_nfs4_acl(struct svc_rqst *rqstp, struct dentry *dentry, struct nfs4_ac | |||
594 | return error; | 594 | return error; |
595 | } | 595 | } |
596 | 596 | ||
597 | #define NFSD_XATTR_JUNCTION_PREFIX XATTR_TRUSTED_PREFIX "junction." | 597 | /* |
598 | #define NFSD_XATTR_JUNCTION_TYPE NFSD_XATTR_JUNCTION_PREFIX "type" | 598 | * NFS junction information is stored in an extended attribute. |
599 | */ | ||
600 | #define NFSD_JUNCTION_XATTR_NAME XATTR_TRUSTED_PREFIX "junction.nfs" | ||
601 | |||
602 | /** | ||
603 | * nfsd4_is_junction - Test if an object could be an NFS junction | ||
604 | * | ||
605 | * @dentry: object to test | ||
606 | * | ||
607 | * Returns 1 if "dentry" appears to contain NFS junction information. | ||
608 | * Otherwise 0 is returned. | ||
609 | */ | ||
599 | int nfsd4_is_junction(struct dentry *dentry) | 610 | int nfsd4_is_junction(struct dentry *dentry) |
600 | { | 611 | { |
601 | struct inode *inode = dentry->d_inode; | 612 | struct inode *inode = dentry->d_inode; |
@@ -606,7 +617,7 @@ int nfsd4_is_junction(struct dentry *dentry) | |||
606 | return 0; | 617 | return 0; |
607 | if (!(inode->i_mode & S_ISVTX)) | 618 | if (!(inode->i_mode & S_ISVTX)) |
608 | return 0; | 619 | return 0; |
609 | if (vfs_getxattr(dentry, NFSD_XATTR_JUNCTION_TYPE, NULL, 0) <= 0) | 620 | if (vfs_getxattr(dentry, NFSD_JUNCTION_XATTR_NAME, NULL, 0) <= 0) |
610 | return 0; | 621 | return 0; |
611 | return 1; | 622 | return 1; |
612 | } | 623 | } |