From mboxrd@z Thu Jan 1 00:00:00 1970 From: "M. Mohan Kumar" Subject: [PATCH/RESEND] Use V9FS_MAGIC in statfs Date: Fri, 17 Sep 2010 20:29:17 +0530 Message-ID: <1284735557-7416-1-git-send-email-mohan@in.ibm.com> To: v9fs-developer@lists.sourceforge.net, linux-fsdevel@vger.kernel.org Return-path: Received: from e23smtp01.au.ibm.com ([202.81.31.143]:56962 "EHLO e23smtp01.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754035Ab0IQO7W (ORCPT ); Fri, 17 Sep 2010 10:59:22 -0400 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [202.81.31.245]) by e23smtp01.au.ibm.com (8.14.4/8.13.1) with ESMTP id o8HEuMKj030803 for ; Sat, 18 Sep 2010 00:56:22 +1000 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o8HExJ2v1020158 for ; Sat, 18 Sep 2010 00:59:19 +1000 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o8HExJCb013787 for ; Sat, 18 Sep 2010 00:59:19 +1000 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Use V9FS_MAGIC as the file system type while filling kernel statfs strucutre instead of using host file system magic number. Also move the definition of V9FS_MAGIC from v9fs.h to standard magic.h file. Signed-off-by: M. Mohan Kumar --- fs/9p/v9fs.h | 2 -- fs/9p/vfs_super.c | 3 ++- include/linux/magic.h | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/9p/v9fs.h b/fs/9p/v9fs.h index 8bb7792..cb63968 100644 --- a/fs/9p/v9fs.h +++ b/fs/9p/v9fs.h @@ -117,8 +117,6 @@ void v9fs_session_close(struct v9fs_session_info *v9ses); void v9fs_session_cancel(struct v9fs_session_info *v9ses); void v9fs_session_begin_cancel(struct v9fs_session_info *v9ses); -#define V9FS_MAGIC 0x01021997 - /* other default globals */ #define V9FS_PORT 564 #define V9FS_DEFUSER "nobody" diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c index 174643f..48d4215 100644 --- a/fs/9p/vfs_super.c +++ b/fs/9p/vfs_super.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -256,7 +257,7 @@ static int v9fs_statfs(struct dentry *dentry, struct kstatfs *buf) if (v9fs_proto_dotl(v9ses)) { res = p9_client_statfs(fid, &rs); if (res == 0) { - buf->f_type = rs.type; + buf->f_type = V9FS_MAGIC; buf->f_bsize = rs.bsize; buf->f_blocks = rs.blocks; buf->f_bfree = rs.bfree; diff --git a/include/linux/magic.h b/include/linux/magic.h index eb9800f..ff690d0 100644 --- a/include/linux/magic.h +++ b/include/linux/magic.h @@ -57,5 +57,6 @@ #define DEVPTS_SUPER_MAGIC 0x1cd1 #define SOCKFS_MAGIC 0x534F434B +#define V9FS_MAGIC 0x01021997 #endif /* __LINUX_MAGIC_H__ */ -- 1.7.0.4