Commit 368c09d2 authored by M. Mohan Kumar's avatar M. Mohan Kumar Committed by Eric Van Hensbergen

9p: Use V9FS_MAGIC in statfs

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: default avatarM. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: default avatarVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
parent 1d769cd1
...@@ -117,8 +117,6 @@ void v9fs_session_close(struct v9fs_session_info *v9ses); ...@@ -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_cancel(struct v9fs_session_info *v9ses);
void v9fs_session_begin_cancel(struct v9fs_session_info *v9ses); void v9fs_session_begin_cancel(struct v9fs_session_info *v9ses);
#define V9FS_MAGIC 0x01021997
/* other default globals */ /* other default globals */
#define V9FS_PORT 564 #define V9FS_PORT 564
#define V9FS_DEFUSER "nobody" #define V9FS_DEFUSER "nobody"
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/statfs.h> #include <linux/statfs.h>
#include <linux/magic.h>
#include <net/9p/9p.h> #include <net/9p/9p.h>
#include <net/9p/client.h> #include <net/9p/client.h>
...@@ -256,7 +257,7 @@ static int v9fs_statfs(struct dentry *dentry, struct kstatfs *buf) ...@@ -256,7 +257,7 @@ static int v9fs_statfs(struct dentry *dentry, struct kstatfs *buf)
if (v9fs_proto_dotl(v9ses)) { if (v9fs_proto_dotl(v9ses)) {
res = p9_client_statfs(fid, &rs); res = p9_client_statfs(fid, &rs);
if (res == 0) { if (res == 0) {
buf->f_type = rs.type; buf->f_type = V9FS_MAGIC;
buf->f_bsize = rs.bsize; buf->f_bsize = rs.bsize;
buf->f_blocks = rs.blocks; buf->f_blocks = rs.blocks;
buf->f_bfree = rs.bfree; buf->f_bfree = rs.bfree;
......
...@@ -57,5 +57,6 @@ ...@@ -57,5 +57,6 @@
#define DEVPTS_SUPER_MAGIC 0x1cd1 #define DEVPTS_SUPER_MAGIC 0x1cd1
#define SOCKFS_MAGIC 0x534F434B #define SOCKFS_MAGIC 0x534F434B
#define V9FS_MAGIC 0x01021997
#endif /* __LINUX_MAGIC_H__ */ #endif /* __LINUX_MAGIC_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment