[Devel] [PATCH rh7 2/6] Revert "VE/VFS: use sb->s_ns member to store namespace for mount_ns() calls"
Vladimir Davydov
vdavydov at parallels.com
Tue Jul 28 04:57:02 PDT 2015
This reverts commit 9e7411c5c3b53937171ef962ce7381337f125b28.
This patch is not longer needed, because none of the mount_ns users
needs sb->s_fs_info any more.
Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
fs/nfs/dns_resolve.c | 2 +-
fs/nfsd/nfs4recover.c | 4 ++--
fs/super.c | 4 ++--
include/linux/fs.h | 2 --
ipc/mqueue.c | 6 +++---
net/sunrpc/clnt.c | 2 +-
net/sunrpc/rpc_pipe.c | 4 ++--
7 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/fs/nfs/dns_resolve.c b/fs/nfs/dns_resolve.c
index dda6202f5967..d25f10fb4926 100644
--- a/fs/nfs/dns_resolve.c
+++ b/fs/nfs/dns_resolve.c
@@ -415,7 +415,7 @@ static int rpc_pipefs_event(struct notifier_block *nb, unsigned long event,
void *ptr)
{
struct super_block *sb = ptr;
- struct net *net = sb->s_ns;
+ struct net *net = sb->s_fs_info;
struct nfs_net *nn = net_generic(net, nfs_net_id);
struct cache_detail *cd = nn->nfs_dns_resolve;
int ret = 0;
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
index 4b4a9ea24416..1d2e66f34c17 100644
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -695,7 +695,7 @@ cld_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
struct cld_upcall *tmp, *cup;
struct cld_msg __user *cmsg = (struct cld_msg __user *)src;
uint32_t xid;
- struct nfsd_net *nn = net_generic(filp->f_dentry->d_sb->s_ns,
+ struct nfsd_net *nn = net_generic(filp->f_dentry->d_sb->s_fs_info,
nfsd_net_id);
struct cld_net *cn = nn->cld_net;
@@ -1355,7 +1355,7 @@ static int
rpc_pipefs_event(struct notifier_block *nb, unsigned long event, void *ptr)
{
struct super_block *sb = ptr;
- struct net *net = sb->s_ns;
+ struct net *net = sb->s_fs_info;
struct nfsd_net *nn = net_generic(net, nfsd_net_id);
struct cld_net *cn = nn->cld_net;
struct dentry *dentry;
diff --git a/fs/super.c b/fs/super.c
index 0978586ed868..ff6ceb84c433 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -907,12 +907,12 @@ EXPORT_SYMBOL(kill_litter_super);
static int ns_test_super(struct super_block *sb, void *data)
{
- return sb->s_ns == data;
+ return sb->s_fs_info == data;
}
static int ns_set_super(struct super_block *sb, void *data)
{
- sb->s_ns = data;
+ sb->s_fs_info = data;
return set_anon_super(sb, NULL);
}
diff --git a/include/linux/fs.h b/include/linux/fs.h
index e0dca856e9fb..e961a07bb37b 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1438,8 +1438,6 @@ struct super_block {
unsigned int s_max_links;
fmode_t s_mode;
- void *s_ns; /* Pointer to namespace */
-
/* Granularity of c/m/atime in ns.
Cannot be worse than a second */
u32 s_time_gran;
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 18620cdde42e..c5089383ca72 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -104,7 +104,7 @@ static inline struct mqueue_inode_info *MQUEUE_I(struct inode *inode)
*/
static inline struct ipc_namespace *__get_ns_from_inode(struct inode *inode)
{
- return get_ipc_ns(inode->i_sb->s_ns);
+ return get_ipc_ns(inode->i_sb->s_fs_info);
}
static struct ipc_namespace *get_ns_from_inode(struct inode *inode)
@@ -407,7 +407,7 @@ static void mqueue_evict_inode(struct inode *inode)
user->mq_bytes -= mq_bytes;
/*
* get_ns_from_inode() ensures that the
- * (ipc_ns = sb->s_ns) is either a valid ipc_ns
+ * (ipc_ns = sb->s_fs_info) is either a valid ipc_ns
* to which we now hold a reference, or it is NULL.
* We can't put it here under mq_lock, though.
*/
@@ -1418,7 +1418,7 @@ int mq_init_ns(struct ipc_namespace *ns)
void mq_clear_sbinfo(struct ipc_namespace *ns)
{
- ns->mq_mnt->mnt_sb->s_ns = NULL;
+ ns->mq_mnt->mnt_sb->s_fs_info = NULL;
}
void mq_put_mnt(struct ipc_namespace *ns)
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 595d5b85ce76..cb7609947e4a 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -241,7 +241,7 @@ static int rpc_pipefs_event(struct notifier_block *nb, unsigned long event,
struct rpc_clnt *clnt;
int error = 0;
- while ((clnt = rpc_get_client_for_event(sb->s_ns, event))) {
+ while ((clnt = rpc_get_client_for_event(sb->s_fs_info, event))) {
error = __rpc_pipefs_event(clnt, event, sb);
if (error)
break;
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index c554527469e9..5145095943d8 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -1428,7 +1428,7 @@ rpc_fill_super(struct super_block *sb, void *data, int silent)
sb);
if (err)
goto err_depopulate;
- sb->s_ns = get_net(net);
+ sb->s_fs_info = get_net(net);
mutex_unlock(&sn->pipefs_sb_lock);
return 0;
@@ -1462,7 +1462,7 @@ rpc_mount(struct file_system_type *fs_type,
static void rpc_kill_sb(struct super_block *sb)
{
- struct net *net = sb->s_ns;
+ struct net *net = sb->s_fs_info;
struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);
mutex_lock(&sn->pipefs_sb_lock);
--
2.1.4
More information about the Devel
mailing list