diff options
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/vfs.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 4f2cd3d27566..af7c3c3074b0 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -254,12 +254,19 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap, | |||
254 | 254 | ||
255 | /* Get inode */ | 255 | /* Get inode */ |
256 | err = fh_verify(rqstp, fhp, ftype, accmode); | 256 | err = fh_verify(rqstp, fhp, ftype, accmode); |
257 | if (err || !iap->ia_valid) | 257 | if (err) |
258 | goto out; | 258 | goto out; |
259 | 259 | ||
260 | dentry = fhp->fh_dentry; | 260 | dentry = fhp->fh_dentry; |
261 | inode = dentry->d_inode; | 261 | inode = dentry->d_inode; |
262 | 262 | ||
263 | /* Ignore any mode updates on symlinks */ | ||
264 | if (S_ISLNK(inode->i_mode)) | ||
265 | iap->ia_valid &= ~ATTR_MODE; | ||
266 | |||
267 | if (!iap->ia_valid) | ||
268 | goto out; | ||
269 | |||
263 | /* NFSv2 does not differentiate between "set-[ac]time-to-now" | 270 | /* NFSv2 does not differentiate between "set-[ac]time-to-now" |
264 | * which only requires access, and "set-[ac]time-to-X" which | 271 | * which only requires access, and "set-[ac]time-to-X" which |
265 | * requires ownership. | 272 | * requires ownership. |