Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fat: Fix allow_utime option

FAT has to handle the newly introduced ATTR_TIMES_SET for allow_utime
option.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

OGAWA Hirofumi and committed by
Linus Torvalds
17263849 84209e02

+4 -2
+4 -2
fs/fat/file.c
··· 313 313 return 0; 314 314 } 315 315 316 + #define TIMES_SET_FLAGS (ATTR_MTIME_SET | ATTR_ATIME_SET | ATTR_TIMES_SET) 317 + 316 318 int fat_setattr(struct dentry *dentry, struct iattr *attr) 317 319 { 318 320 struct msdos_sb_info *sbi = MSDOS_SB(dentry->d_sb); ··· 338 336 339 337 /* Check for setting the inode time. */ 340 338 ia_valid = attr->ia_valid; 341 - if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET)) { 339 + if (ia_valid & TIMES_SET_FLAGS) { 342 340 if (fat_allow_set_time(sbi, inode)) 343 - attr->ia_valid &= ~(ATTR_MTIME_SET | ATTR_ATIME_SET); 341 + attr->ia_valid &= ~TIMES_SET_FLAGS; 344 342 } 345 343 346 344 error = inode_change_ok(inode, attr);