summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>2008-08-02 13:59:37 +0900
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-02 09:13:55 -0700
commit17263849c7ad2279667dd298083eceefcd1b5845 (patch)
treef723958f21f8737bd52758505737468c1fc69c42 /fs
parent84209e02de48d72289650cc5a7ae8dd18223620f (diff)
downloadkernel-common-17263849c7ad2279667dd298083eceefcd1b5845.tar.gz
kernel-common-17263849c7ad2279667dd298083eceefcd1b5845.tar.bz2
kernel-common-17263849c7ad2279667dd298083eceefcd1b5845.zip
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/fat/file.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/fat/file.c b/fs/fat/file.c
index 8707a8cfa02c..ddde37025ca6 100644
--- a/fs/fat/file.c
+++ b/fs/fat/file.c
@@ -313,6 +313,8 @@ static int fat_allow_set_time(struct msdos_sb_info *sbi, struct inode *inode)
return 0;
}
+#define TIMES_SET_FLAGS (ATTR_MTIME_SET | ATTR_ATIME_SET | ATTR_TIMES_SET)
+
int fat_setattr(struct dentry *dentry, struct iattr *attr)
{
struct msdos_sb_info *sbi = MSDOS_SB(dentry->d_sb);
@@ -336,9 +338,9 @@ int fat_setattr(struct dentry *dentry, struct iattr *attr)
/* Check for setting the inode time. */
ia_valid = attr->ia_valid;
- if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET)) {
+ if (ia_valid & TIMES_SET_FLAGS) {
if (fat_allow_set_time(sbi, inode))
- attr->ia_valid &= ~(ATTR_MTIME_SET | ATTR_ATIME_SET);
+ attr->ia_valid &= ~TIMES_SET_FLAGS;
}
error = inode_change_ok(inode, attr);