|
@@ -254,12 +254,19 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
|
|
|
|
|
|
/* Get inode */
|
|
|
err = fh_verify(rqstp, fhp, ftype, accmode);
|
|
|
- if (err || !iap->ia_valid)
|
|
|
+ if (err)
|
|
|
goto out;
|
|
|
|
|
|
dentry = fhp->fh_dentry;
|
|
|
inode = dentry->d_inode;
|
|
|
|
|
|
+ /* Ignore any mode updates on symlinks */
|
|
|
+ if (S_ISLNK(inode->i_mode))
|
|
|
+ iap->ia_valid &= ~ATTR_MODE;
|
|
|
+
|
|
|
+ if (!iap->ia_valid)
|
|
|
+ goto out;
|
|
|
+
|
|
|
/* NFSv2 does not differentiate between "set-[ac]time-to-now"
|
|
|
* which only requires access, and "set-[ac]time-to-X" which
|
|
|
* requires ownership.
|