Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy...
[pandora-kernel.git] / fs / jfs / ioctl.c
index 67b3774..fe063af 100644 (file)
@@ -6,10 +6,10 @@
  */
 
 #include <linux/fs.h>
-#include <linux/ext2_fs.h>
 #include <linux/ctype.h>
 #include <linux/capability.h>
 #include <linux/time.h>
+#include <linux/sched.h>
 #include <asm/current.h>
 #include <asm/uaccess.h>
 
@@ -22,13 +22,13 @@ static struct {
        long jfs_flag;
        long ext2_flag;
 } jfs_map[] = {
-       {JFS_NOATIME_FL, EXT2_NOATIME_FL},
-       {JFS_DIRSYNC_FL, EXT2_DIRSYNC_FL},
-       {JFS_SYNC_FL, EXT2_SYNC_FL},
-       {JFS_SECRM_FL, EXT2_SECRM_FL},
-       {JFS_UNRM_FL, EXT2_UNRM_FL},
-       {JFS_APPEND_FL, EXT2_APPEND_FL},
-       {JFS_IMMUTABLE_FL, EXT2_IMMUTABLE_FL},
+       {JFS_NOATIME_FL,        FS_NOATIME_FL},
+       {JFS_DIRSYNC_FL,        FS_DIRSYNC_FL},
+       {JFS_SYNC_FL,           FS_SYNC_FL},
+       {JFS_SECRM_FL,          FS_SECRM_FL},
+       {JFS_UNRM_FL,           FS_UNRM_FL},
+       {JFS_APPEND_FL,         FS_APPEND_FL},
+       {JFS_IMMUTABLE_FL,      FS_IMMUTABLE_FL},
        {0, 0},
 };
 
@@ -59,6 +59,7 @@ int jfs_ioctl(struct inode * inode, struct file * filp, unsigned int cmd,
 
        switch (cmd) {
        case JFS_IOC_GETFLAGS:
+               jfs_get_inode_flags(jfs_inode);
                flags = jfs_inode->mode2 & JFS_FL_USER_VISIBLE;
                flags = jfs_map_ext2(flags, 0);
                return put_user(flags, (int __user *) arg);
@@ -78,6 +79,7 @@ int jfs_ioctl(struct inode * inode, struct file * filp, unsigned int cmd,
                if (!S_ISDIR(inode->i_mode))
                        flags &= ~JFS_DIRSYNC_FL;
 
+               jfs_get_inode_flags(jfs_inode);
                oldflags = jfs_inode->mode2;
 
                /*