[Devel] [PATCH RHEL7 COMMIT] fs/fuse: move FUSE_SUPER_MAGIC to magic.h

Konstantin Khorenko khorenko at virtuozzo.com
Wed May 23 10:59:41 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-693.21.1.vz7.50.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.21.1.vz7.50.1
------>
commit 553c08ad95c13734fa2dfd29946a1dca4f79e0fc
Author: Pavel Butsykin <pbutsykin at virtuozzo.com>
Date:   Wed May 23 10:59:41 2018 +0300

    fs/fuse: move FUSE_SUPER_MAGIC to magic.h
    
    Let's define it only once.
    
    https://jira.sw.ru/browse/HCI-52
    
    Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
    Acked-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/block/ploop/dev.c     | 1 -
 drivers/block/ploop/io_kaio.c | 3 ---
 fs/fuse/inode.c               | 2 --
 include/uapi/linux/magic.h    | 1 +
 4 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index 533ddc965af2..0e72656ec8f9 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -3880,7 +3880,6 @@ static int ploop_truncate(struct ploop_device * plo, unsigned long arg)
 	return err;
 }
 
-#define FUSE_SUPER_MAGIC 0x65735546
 #define IS_PSTORAGE(sb) (sb->s_magic == FUSE_SUPER_MAGIC && \
 			 (!strcmp(sb->s_subtype, "pstorage") || \
 			  !strcmp(sb->s_subtype, "vstorage")))
diff --git a/drivers/block/ploop/io_kaio.c b/drivers/block/ploop/io_kaio.c
index c7312c54595e..48baa447ef91 100644
--- a/drivers/block/ploop/io_kaio.c
+++ b/drivers/block/ploop/io_kaio.c
@@ -17,9 +17,6 @@
 
 #include <linux/ploop/ploop.h>
 
-/* from fs/inode/fuse.c */
-#define FUSE_SUPER_MAGIC 0x65735546
-
 #define KAIO_PREALLOC (128 * 1024 * 1024) /* 128 MB */
 
 #define KAIO_MAX_PAGES_PER_REQ 32	  /* 128 KB */
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 9941561587ff..ae002183f5f7 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -51,8 +51,6 @@ MODULE_PARM_DESC(max_user_congthresh,
  "Global limit for the maximum congestion threshold an "
  "unprivileged user can set");
 
-#define FUSE_SUPER_MAGIC 0x65735546
-
 #define FUSE_DEFAULT_BLKSIZE 512
 
 /** Maximum number of outstanding background requests */
diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
index 599c96d6d03d..e0698ec4536b 100644
--- a/include/uapi/linux/magic.h
+++ b/include/uapi/linux/magic.h
@@ -32,6 +32,7 @@
 #define EFIVARFS_MAGIC		0xde5e81e4
 #define HOSTFS_SUPER_MAGIC	0x00c0ffee
 #define OVERLAYFS_SUPER_MAGIC	0x794c7630
+#define FUSE_SUPER_MAGIC	0x65735546
 
 #define MINIX_SUPER_MAGIC	0x137F		/* minix v1 fs, 14 char names */
 #define MINIX_SUPER_MAGIC2	0x138F		/* minix v1 fs, 30 char names */


More information about the Devel mailing list