OSDN Git Service

f2fs: constify super_operations
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Thu, 31 Aug 2017 09:36:24 +0000 (15:06 +0530)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 21 Sep 2017 21:15:26 +0000 (14:15 -0700)
super_operations are not supposed to change at runtime.
"struct super_block" working with super_operations provided
by <linux/fs.h> work with const super_operations. So mark
the non-const structs as const

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/super.c

index 4a5eae7..7317941 100644 (file)
@@ -1550,7 +1550,7 @@ void f2fs_quota_off_umount(struct super_block *sb)
 }
 #endif
 
-static struct super_operations f2fs_sops = {
+static const struct super_operations f2fs_sops = {
        .alloc_inode    = f2fs_alloc_inode,
        .drop_inode     = f2fs_drop_inode,
        .destroy_inode  = f2fs_destroy_inode,