From f432494530b412add5a963de7593adb38262d0d5 Mon Sep 17 00:00:00 2001 From: OGAWA Hirofumi Date: Sat, 2 Aug 2008 13:59:37 +0900 Subject: [PATCH] --- yaml --- r: 107497 b: refs/heads/master c: 17263849c7ad2279667dd298083eceefcd1b5845 h: refs/heads/master i: 107495: 46633f624a63b87b701a25e9b28b376d9a9c4d48 v: v3 --- [refs] | 2 +- trunk/fs/fat/file.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 77796f6b88af..c7e66ef3b695 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 84209e02de48d72289650cc5a7ae8dd18223620f +refs/heads/master: 17263849c7ad2279667dd298083eceefcd1b5845 diff --git a/trunk/fs/fat/file.c b/trunk/fs/fat/file.c index 8707a8cfa02c..ddde37025ca6 100644 --- a/trunk/fs/fat/file.c +++ b/trunk/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);