linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 05/11 linux-next] ubifs: use magic.h
@ 2017-05-21 15:41 Fabian Frederick
  2017-05-21 16:38 ` Richard Weinberger
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2017-05-21 15:41 UTC (permalink / raw)
  To: Alexander Viro
  Cc: Richard Weinberger, linux-mtd, linux-fsdevel, linux-kernel, fabf

Filesystems generally use SUPER_MAGIC values from magic.h
instead of a local definition.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 fs/ubifs/ubifs.h           | 4 +---
 include/uapi/linux/magic.h | 1 +
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
index 298b4d8..abc60d5 100644
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -38,6 +38,7 @@
 #include <linux/backing-dev.h>
 #include <linux/security.h>
 #include <linux/xattr.h>
+#include <linux/magic.h>
 #ifdef CONFIG_UBIFS_FS_ENCRYPTION
 #include <linux/fscrypt_supp.h>
 #else
@@ -49,9 +50,6 @@
 /* Version of this UBIFS implementation */
 #define UBIFS_VERSION 1
 
-/* UBIFS file system VFS magic number */
-#define UBIFS_SUPER_MAGIC 0x24051905
-
 /* Number of UBIFS blocks per VFS page */
 #define UBIFS_BLOCKS_PER_PAGE (PAGE_SIZE / UBIFS_BLOCK_SIZE)
 #define UBIFS_BLOCKS_PER_PAGE_SHIFT (PAGE_SHIFT - UBIFS_BLOCK_SHIFT)
diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
index a83c48f..b651a02 100644
--- a/include/uapi/linux/magic.h
+++ b/include/uapi/linux/magic.h
@@ -70,6 +70,7 @@
 #define SYSFS_MAGIC		0x62656572
 #define TMPFS_MAGIC		0x01021994
 #define TRACEFS_MAGIC		0x74726163
+#define UBIFS_SUPER_MAGIC	0x24051905
 #define UDF_SUPER_MAGIC		0x15013346	/* Since UDF 2.01 is ISO 13346 based... */
 #define USBDEVICE_SUPER_MAGIC	0x9fa2
 #define V9FS_MAGIC		0x01021997
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 05/11 linux-next] ubifs: use magic.h
  2017-05-21 15:41 [PATCH 05/11 linux-next] ubifs: use magic.h Fabian Frederick
@ 2017-05-21 16:38 ` Richard Weinberger
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Weinberger @ 2017-05-21 16:38 UTC (permalink / raw)
  To: Fabian Frederick, Alexander Viro; +Cc: linux-mtd, linux-fsdevel, linux-kernel

Fabian,

Am 21.05.2017 um 17:41 schrieb Fabian Frederick:
> Filesystems generally use SUPER_MAGIC values from magic.h
> instead of a local definition.
> 
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
>  fs/ubifs/ubifs.h           | 4 +---
>  include/uapi/linux/magic.h | 1 +
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
> index 298b4d8..abc60d5 100644
> --- a/fs/ubifs/ubifs.h
> +++ b/fs/ubifs/ubifs.h
> @@ -38,6 +38,7 @@
>  #include <linux/backing-dev.h>
>  #include <linux/security.h>
>  #include <linux/xattr.h>
> +#include <linux/magic.h>
>  #ifdef CONFIG_UBIFS_FS_ENCRYPTION
>  #include <linux/fscrypt_supp.h>
>  #else
> @@ -49,9 +50,6 @@
>  /* Version of this UBIFS implementation */
>  #define UBIFS_VERSION 1
>  
> -/* UBIFS file system VFS magic number */
> -#define UBIFS_SUPER_MAGIC 0x24051905
> -
>  /* Number of UBIFS blocks per VFS page */
>  #define UBIFS_BLOCKS_PER_PAGE (PAGE_SIZE / UBIFS_BLOCK_SIZE)
>  #define UBIFS_BLOCKS_PER_PAGE_SHIFT (PAGE_SHIFT - UBIFS_BLOCK_SHIFT)
> diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
> index a83c48f..b651a02 100644
> --- a/include/uapi/linux/magic.h
> +++ b/include/uapi/linux/magic.h
> @@ -70,6 +70,7 @@
>  #define SYSFS_MAGIC		0x62656572
>  #define TMPFS_MAGIC		0x01021994
>  #define TRACEFS_MAGIC		0x74726163
> +#define UBIFS_SUPER_MAGIC	0x24051905
>  #define UDF_SUPER_MAGIC		0x15013346	/* Since UDF 2.01 is ISO 13346 based... */
>  #define USBDEVICE_SUPER_MAGIC	0x9fa2
>  #define V9FS_MAGIC		0x01021997
> 

Acked-by: Richard Weinberger <richard@nod.at>

Thanks,
//richard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-21 16:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-21 15:41 [PATCH 05/11 linux-next] ubifs: use magic.h Fabian Frederick
2017-05-21 16:38 ` Richard Weinberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).