]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/fat/file.c
fat: split include/msdos_fs.h
[linux-2.6-omap-h63xx.git] / fs / fat / file.c
index 8707a8cfa02cdd8454056ed320ee49a4604c84f8..b21973f266a13bc67456681ccc1f818477af9aed 100644 (file)
 #include <linux/module.h>
 #include <linux/mount.h>
 #include <linux/time.h>
-#include <linux/msdos_fs.h>
 #include <linux/buffer_head.h>
 #include <linux/writeback.h>
 #include <linux/backing-dev.h>
 #include <linux/blkdev.h>
 #include <linux/fsnotify.h>
 #include <linux/security.h>
+#include "fat.h"
 
 int fat_generic_ioctl(struct inode *inode, struct file *filp,
                      unsigned int cmd, unsigned long arg)
@@ -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);