Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107497
b: refs/heads/master
c: 1726384
h: refs/heads/master
i:
  107495: 46633f6
v: v3
  • Loading branch information
OGAWA Hirofumi authored and Linus Torvalds committed Aug 2, 2008
1 parent 6350880 commit f432494
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 84209e02de48d72289650cc5a7ae8dd18223620f
refs/heads/master: 17263849c7ad2279667dd298083eceefcd1b5845
6 changes: 4 additions & 2 deletions trunk/fs/fat/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit f432494

Please sign in to comment.