|
@@ -2143,6 +2143,7 @@ nfsd4_encode_aclname(struct xdr_stream *xdr, struct svc_rqst *rqstp,
|
|
|
#define WORD0_ABSENT_FS_ATTRS (FATTR4_WORD0_FS_LOCATIONS | FATTR4_WORD0_FSID | \
|
|
|
FATTR4_WORD0_RDATTR_ERROR)
|
|
|
#define WORD1_ABSENT_FS_ATTRS FATTR4_WORD1_MOUNTED_ON_FILEID
|
|
|
+#define WORD2_ABSENT_FS_ATTRS 0
|
|
|
|
|
|
#ifdef CONFIG_NFSD_V4_SECURITY_LABEL
|
|
|
static inline __be32
|
|
@@ -2171,7 +2172,7 @@ nfsd4_encode_security_label(struct xdr_stream *xdr, struct svc_rqst *rqstp,
|
|
|
{ return 0; }
|
|
|
#endif
|
|
|
|
|
|
-static __be32 fattr_handle_absent_fs(u32 *bmval0, u32 *bmval1, u32 *rdattr_err)
|
|
|
+static __be32 fattr_handle_absent_fs(u32 *bmval0, u32 *bmval1, u32 *bmval2, u32 *rdattr_err)
|
|
|
{
|
|
|
/* As per referral draft: */
|
|
|
if (*bmval0 & ~WORD0_ABSENT_FS_ATTRS ||
|
|
@@ -2184,6 +2185,7 @@ static __be32 fattr_handle_absent_fs(u32 *bmval0, u32 *bmval1, u32 *rdattr_err)
|
|
|
}
|
|
|
*bmval0 &= WORD0_ABSENT_FS_ATTRS;
|
|
|
*bmval1 &= WORD1_ABSENT_FS_ATTRS;
|
|
|
+ *bmval2 &= WORD2_ABSENT_FS_ATTRS;
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -2246,8 +2248,7 @@ nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp,
|
|
|
BUG_ON(bmval2 & ~nfsd_suppattrs2(minorversion));
|
|
|
|
|
|
if (exp->ex_fslocs.migrated) {
|
|
|
- BUG_ON(bmval[2]);
|
|
|
- status = fattr_handle_absent_fs(&bmval0, &bmval1, &rdattr_err);
|
|
|
+ status = fattr_handle_absent_fs(&bmval0, &bmval1, &bmval2, &rdattr_err);
|
|
|
if (status)
|
|
|
goto out;
|
|
|
}
|
|
@@ -2286,8 +2287,8 @@ nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp,
|
|
|
}
|
|
|
|
|
|
#ifdef CONFIG_NFSD_V4_SECURITY_LABEL
|
|
|
- if ((bmval[2] & FATTR4_WORD2_SECURITY_LABEL) ||
|
|
|
- bmval[0] & FATTR4_WORD0_SUPPORTED_ATTRS) {
|
|
|
+ if ((bmval2 & FATTR4_WORD2_SECURITY_LABEL) ||
|
|
|
+ bmval0 & FATTR4_WORD0_SUPPORTED_ATTRS) {
|
|
|
err = security_inode_getsecctx(d_inode(dentry),
|
|
|
&context, &contextlen);
|
|
|
contextsupport = (err == 0);
|