]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] remount: forced-nodiratime filesystems
authorAlexander Viro <viro@www.linux.org.uk>
Fri, 16 Apr 2004 07:27:41 +0000 (00:27 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 16 Apr 2004 07:27:41 +0000 (00:27 -0700)
 - a bunch of filesystems force MS_NODIRATIME on mount but forgot to do
   the same on remount.  Fixed.

fs/adfs/super.c
fs/affs/super.c
fs/cifs/cifsfs.c
fs/coda/inode.c
fs/fat/inode.c
fs/hfs/super.c
fs/jffs/inode-v23.c
fs/ncpfs/inode.c
fs/proc/inode.c
fs/smbfs/inode.c

index c667ba8bcfdfc178af780f90fdccf401f07b5ce0..e9462e76ac4cda57aa2b63aaf6b0cf271ed2ddb7 100644 (file)
@@ -192,6 +192,7 @@ static int parse_options(struct super_block *sb, char *options)
 
 static int adfs_remount(struct super_block *sb, int *flags, char *data)
 {
+       *flags |= MS_NODIRATIME;
        return parse_options(sb, data);
 }
 
index f8564e1556e9e1bc2e75a33b5f9839982d402f50..ad83ec3a9a45394e8a60f946cb5c2a54b8f70af4 100644 (file)
@@ -502,6 +502,8 @@ affs_remount(struct super_block *sb, int *flags, char *data)
 
        pr_debug("AFFS: remount(flags=0x%x,opts=\"%s\")\n",*flags,data);
 
+       *flags |= MS_NODIRATIME;
+
        if (!parse_options(data,&uid,&gid,&mode,&reserved,&root_block,
            &blocksize,&sbi->s_prefix,sbi->s_volume,&mount_flags))
                return -EINVAL;
index 8be5f19797ce5e5da0719c8e93634138001303e8..47e9fa5126321ac77e8682b14bba3bdd4d9e6a75 100644 (file)
@@ -357,6 +357,12 @@ static struct quotactl_ops cifs_quotactl_ops = {
 };
 #endif
 
+static int cifs_remount(struct super_block *sb, int *flags, char *data)
+{
+       *flags |= MS_NODIRATIME;
+       return 0;
+}
+
 struct super_operations cifs_super_ops = {
        .read_inode = cifs_read_inode,
        .put_super = cifs_put_super,
@@ -369,6 +375,7 @@ struct super_operations cifs_super_ops = {
    us with the same number of releases (closes) as opens */
        .show_options = cifs_show_options,
 /*    .umount_begin   = cifs_umount_begin, *//* consider adding in the future */
+       .remount_fs = cifs_remount,
 };
 
 static struct super_block *
index 35508b184aa51c3a01feb4f601b7f97a27ac4bf3..7345de45fb9a357fee15a885db01206587274b79 100644 (file)
@@ -82,6 +82,12 @@ void coda_destroy_inodecache(void)
                printk(KERN_INFO "coda_inode_cache: not all structures were freed\n");
 }
 
+static int coda_remount(struct super_block *sb, int *flags, char *data)
+{
+       *flags |= MS_NODIRATIME;
+       return 0;
+}
+
 /* exported operations */
 struct super_operations coda_super_operations =
 {
@@ -90,6 +96,7 @@ struct super_operations coda_super_operations =
        .clear_inode    = coda_clear_inode,
        .put_super      = coda_put_super,
        .statfs         = coda_statfs,
+       .remount_fs     = coda_remount,
 };
 
 static int get_device_index(struct coda_mount_data *data)
index 61989dd8dd7e869031ccc73eb7852bc8691b9145..457af7291bec11a56503e30593d0041696e389b4 100644 (file)
@@ -734,6 +734,12 @@ void __exit fat_destroy_inodecache(void)
                printk(KERN_INFO "fat_inode_cache: not all structures were freed\n");
 }
 
+static int fat_remount(struct super_block *sb, int *flags, char *data)
+{
+       *flags |= MS_NODIRATIME;
+       return 0;
+}
+
 static struct super_operations fat_sops = { 
        .alloc_inode    = fat_alloc_inode,
        .destroy_inode  = fat_destroy_inode,
@@ -742,6 +748,7 @@ static struct super_operations fat_sops = {
        .put_super      = fat_put_super,
        .statfs         = fat_statfs,
        .clear_inode    = fat_clear_inode,
+       .remount_fs     = fat_remount,
 
        .read_inode     = make_bad_inode,
 
index c4e1b9cef310a07751538da5c4932a0f1af0ff29..2b7d0b21d8968babcebcd77cdfd178cf0b6f1681 100644 (file)
@@ -94,6 +94,7 @@ static int hfs_statfs(struct super_block *sb, struct kstatfs *buf)
 
 int hfs_remount(struct super_block *sb, int *flags, char *data)
 {
+       *flags |= MS_NODIRATIME;
        if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY))
                return 0;
        if (!(*flags & MS_RDONLY)) {
index 80e7b3f445105b4964af9be255d1e9f935110d00..fe30a98f443aa19097208f4a83084e477fd4900d 100644 (file)
@@ -1771,6 +1771,12 @@ jffs_write_super(struct super_block *sb)
        unlock_kernel();
 }
 
+static int jffs_remount(struct super_block *sb, int *flags, char *data)
+{
+       *flags |= MS_NODIRATIME;
+       return 0;
+}
+
 static struct super_operations jffs_ops =
 {
        .read_inode     = jffs_read_inode,
@@ -1778,6 +1784,7 @@ static struct super_operations jffs_ops =
        .put_super      = jffs_put_super,
        .write_super    = jffs_write_super,
        .statfs         = jffs_statfs,
+       .remount_fs     = jffs_remount,
 };
 
 static struct super_block *jffs_get_sb(struct file_system_type *fs_type,
index 9750a4f49940ab2f2e4ab2b6bc53540d85860d6d..cda1ffd34bbd57a4741382a4ef47af562a03dd97 100644 (file)
@@ -85,6 +85,12 @@ static void destroy_inodecache(void)
                printk(KERN_INFO "ncp_inode_cache: not all structures were freed\n");
 }
 
+static int ncp_remount(struct super_block *sb, int *flags, char* data)
+{
+       *flags |= MS_NODIRATIME;
+       return 0;
+}
+
 static struct super_operations ncp_sops =
 {
        .alloc_inode    = ncp_alloc_inode,
@@ -93,6 +99,7 @@ static struct super_operations ncp_sops =
        .delete_inode   = ncp_delete_inode,
        .put_super      = ncp_put_super,
        .statfs         = ncp_statfs,
+       .remount_fs     = ncp_remount,
 };
 
 extern struct dentry_operations ncp_root_dentry_operations;
index 7405c1cc3e9436061064bfc5cbb8388c6bc83e55..119e355298d6614cc31299a026d0cdb75412caf8 100644 (file)
@@ -127,6 +127,12 @@ int __init proc_init_inodecache(void)
        return 0;
 }
 
+static int proc_remount(struct super_block *sb, int *flags, char *data)
+{
+       *flags |= MS_NODIRATIME;
+       return 0;
+}
+
 static struct super_operations proc_sops = { 
        .alloc_inode    = proc_alloc_inode,
        .destroy_inode  = proc_destroy_inode,
@@ -134,6 +140,7 @@ static struct super_operations proc_sops = {
        .drop_inode     = generic_delete_inode,
        .delete_inode   = proc_delete_inode,
        .statfs         = simple_statfs,
+       .remount_fs     = proc_remount,
 };
 
 enum {
index 02cf8f08500dc1784468ea7f4062c9d1b77adf13..4d4b5f40072df056af4fa8a6eb315ba22ac3272d 100644 (file)
@@ -93,6 +93,12 @@ static void destroy_inodecache(void)
                printk(KERN_INFO "smb_inode_cache: not all structures were freed\n");
 }
 
+static int smb_remount(struct super_block *sb, int *flags, char *data)
+{
+       *flags |= MS_NODIRATIME;
+       return 0;
+}
+
 static struct super_operations smb_sops =
 {
        .alloc_inode    = smb_alloc_inode,
@@ -102,6 +108,7 @@ static struct super_operations smb_sops =
        .put_super      = smb_put_super,
        .statfs         = smb_statfs,
        .show_options   = smb_show_options,
+       .remount_fs     = smb_remount,
 };