9p: Use V9FS_MAGIC in statfs
authorM. Mohan Kumar <mohan@in.ibm.com>
Mon, 27 Sep 2010 08:47:24 +0000 (14:17 +0530)
committerEric Van Hensbergen <ericvh@gmail.com>
Thu, 28 Oct 2010 14:08:47 +0000 (09:08 -0500)
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 <mohan@in.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
fs/9p/v9fs.h
fs/9p/vfs_super.c
include/linux/magic.h

index 8bb7792afe2edbf77d63a7367dbcc0d651db71ef..cb6396855e2dff98240176c0f4acfed575606798 100644 (file)
@@ -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"
index 174643f4f901a7621edb99bdbe9ef9afa258991d..48d4215c60a8924df5dbb35706a28f84ac9ea5eb 100644 (file)
@@ -39,6 +39,7 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/statfs.h>
+#include <linux/magic.h>
 #include <net/9p/9p.h>
 #include <net/9p/client.h>
 
@@ -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;
index eb9800f05782413f640a0b3fcf68dbf1aa5ca7fa..ff690d05f129c5af1f51b740c975f6a014d55221 100644 (file)
@@ -57,5 +57,6 @@
 
 #define DEVPTS_SUPER_MAGIC     0x1cd1
 #define SOCKFS_MAGIC           0x534F434B
+#define V9FS_MAGIC             0x01021997
 
 #endif /* __LINUX_MAGIC_H__ */