From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karel Zak Subject: [PATCH 16/22] ntfs: move NTFS_SUPER_MAGIC to Date: Tue, 4 Mar 2014 11:00:52 +0100 Message-ID: <1393927258-10709-17-git-send-email-kzak@redhat.com> References: <1393927258-10709-1-git-send-email-kzak@redhat.com> Cc: linux-fsdevel@vger.kernel.org, Karel Zak , Anton Altaparmakov To: Al Viro Return-path: Received: from mx1.redhat.com ([209.132.183.28]:30174 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756877AbaCDKCT (ORCPT ); Tue, 4 Mar 2014 05:02:19 -0500 In-Reply-To: <1393927258-10709-1-git-send-email-kzak@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Move the magic number to proper place. CC: Anton Altaparmakov Signed-off-by: Karel Zak --- fs/ntfs/ntfs.h | 2 +- fs/ntfs/super.c | 4 ++-- include/uapi/linux/magic.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/ntfs/ntfs.h b/fs/ntfs/ntfs.h index d6a340bf..4d2175a 100644 --- a/fs/ntfs/ntfs.h +++ b/fs/ntfs/ntfs.h @@ -32,6 +32,7 @@ #include #include #include +#include #include "types.h" #include "volume.h" @@ -40,7 +41,6 @@ typedef enum { NTFS_BLOCK_SIZE = 512, NTFS_BLOCK_SIZE_BITS = 9, - NTFS_SB_MAGIC = 0x5346544e, /* 'NTFS' */ NTFS_MAX_NAME_LEN = 255, NTFS_MAX_ATTR_NAME_LEN = 255, NTFS_MAX_CLUSTER_SIZE = 64 * 1024, /* 64kiB */ diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index 82650d5..6b0931f 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c @@ -2620,7 +2620,7 @@ static int ntfs_statfs(struct dentry *dentry, struct kstatfs *sfs) ntfs_debug("Entering."); /* Type of filesystem. */ - sfs->f_type = NTFS_SB_MAGIC; + sfs->f_type = NTFS_SUPER_MAGIC; /* Optimal transfer block size. */ sfs->f_bsize = PAGE_CACHE_SIZE; /* @@ -2847,7 +2847,7 @@ static int ntfs_fill_super(struct super_block *sb, void *opt, const int silent) /* Initialize the cluster and mft allocators. */ ntfs_setup_allocators(vol); /* Setup remaining fields in the super block. */ - sb->s_magic = NTFS_SB_MAGIC; + sb->s_magic = NTFS_SUPER_MAGIC; /* * Ntfs allows 63 bits for the file size, i.e. correct would be: * sb->s_maxbytes = ~0ULL >> 1; diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h index a102467..974e47e 100644 --- a/include/uapi/linux/magic.h +++ b/include/uapi/linux/magic.h @@ -33,6 +33,7 @@ #define FUSE_SUPER_MAGIC 0x65735546 #define BTRFS_SUPER_MAGIC 0x9123683E #define NILFS_SUPER_MAGIC 0x3434 +#define NTFS_SUPER_MAGIC 0x5346544e /* 'NTFS' */ #define F2FS_SUPER_MAGIC 0xF2F52010 #define HPFS_SUPER_MAGIC 0xf995e849 #define ISOFS_SUPER_MAGIC 0x9660 -- 1.8.5.3