Address an NFSD regression introduced during the 6.0 merge window
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEKLLlsBKG3yQ88j7+M2qzM29mf5cFAmMfnhkACgkQM2qzM29m f5cgWA/9HLrh55F9y4PEf1ZQFCVZ/PWUGNJlBOXwKfudxiBgOk/LsbC9b9DhQ4de KaGJZXs9pxNbOkKVJIPJM8GX4E8jcnWDMGBLI5CPlPk8x4QTL7TKrMg0Lb0Ihqo/ yA7bVK9NBV0K5vMryx4tBgZEdjOJGCGESlBmAkx/wnsTlt7xuG6vy1KQ//wNY6Q4 Y+iejoSKa4Dssqu+TC9Hm2VSPK3NJe2I+mmsNFqdFC0hV3/MmIvNzkE7P33qlK+H zofquzGziwAfOPGpDznqZi8rYUBiSceknHzoIa521jdwUNl1x1LKJAsYd0kaLH1i h3H5mUifouR3nwjexHYE2KYm3yGI+u3Pfupvdqa6kCTnRuw2Xqyh5OogAgHiuEYb SyHCatIA3QUOg8zuuh2IaKP8zeWkkVGvBAZ+O7jHytowMH9QWHq7p2lz/he8p6BF 6Qk+lUKVsGLCdi2HK69lubT6odAJgMu9QAztfCVYgbPH3uxdOb93X9kODcoIDL6e T48uzDrTKyk26kRBiP8RNwpltJs12dfMo5W0I/BHI8WUB2EGweRKOPs0e2GAMH8k G4EsrJmUiN3CPWGxX/dZ3in6EFU0F+zc1S+MSDGgmp48RruRwq004V6tEylaRArY Wg6btK3xktiHCW6OqluKqzNVy4FDQrZfO6xdHMN5PI9jhFWbdP4= =fcET -----END PGP SIGNATURE----- Merge tag 'nfsd-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fix from Chuck Lever: "Address an NFSD regression introduced during the 6.0 merge window" * tag 'nfsd-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: NFSD: fix regression with setting ACLs.
This commit is contained in:
commit
62d1cea7d6
|
@ -300,6 +300,10 @@ commit_metadata(struct svc_fh *fhp)
|
|||
static void
|
||||
nfsd_sanitize_attrs(struct inode *inode, struct iattr *iap)
|
||||
{
|
||||
/* Ignore mode updates on symlinks */
|
||||
if (S_ISLNK(inode->i_mode))
|
||||
iap->ia_valid &= ~ATTR_MODE;
|
||||
|
||||
/* sanitize the mode change */
|
||||
if (iap->ia_valid & ATTR_MODE) {
|
||||
iap->ia_mode &= S_IALLUGO;
|
||||
|
@ -353,7 +357,7 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp,
|
|||
int accmode = NFSD_MAY_SATTR;
|
||||
umode_t ftype = 0;
|
||||
__be32 err;
|
||||
int host_err;
|
||||
int host_err = 0;
|
||||
bool get_write_count;
|
||||
bool size_change = (iap->ia_valid & ATTR_SIZE);
|
||||
|
||||
|
@ -391,13 +395,6 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp,
|
|||
dentry = fhp->fh_dentry;
|
||||
inode = d_inode(dentry);
|
||||
|
||||
/* Ignore any mode updates on symlinks */
|
||||
if (S_ISLNK(inode->i_mode))
|
||||
iap->ia_valid &= ~ATTR_MODE;
|
||||
|
||||
if (!iap->ia_valid)
|
||||
return 0;
|
||||
|
||||
nfsd_sanitize_attrs(inode, iap);
|
||||
|
||||
if (check_guard && guardtime != inode->i_ctime.tv_sec)
|
||||
|
@ -448,8 +445,10 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp,
|
|||
goto out_unlock;
|
||||
}
|
||||
|
||||
iap->ia_valid |= ATTR_CTIME;
|
||||
host_err = notify_change(&init_user_ns, dentry, iap, NULL);
|
||||
if (iap->ia_valid) {
|
||||
iap->ia_valid |= ATTR_CTIME;
|
||||
host_err = notify_change(&init_user_ns, dentry, iap, NULL);
|
||||
}
|
||||
|
||||
out_unlock:
|
||||
if (attr->na_seclabel && attr->na_seclabel->len)
|
||||
|
|
Loading…
Reference in New Issue