aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/rpc_pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/rpc_pipe.c')
-rw-r--r--net/sunrpc/rpc_pipe.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 80f5dd23417d..fd10981ea792 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -1093,7 +1093,7 @@ void rpc_put_sb_net(const struct net *net)
1093{ 1093{
1094 struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); 1094 struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);
1095 1095
1096 BUG_ON(sn->pipefs_sb == NULL); 1096 WARN_ON(sn->pipefs_sb == NULL);
1097 mutex_unlock(&sn->pipefs_sb_lock); 1097 mutex_unlock(&sn->pipefs_sb_lock);
1098} 1098}
1099EXPORT_SYMBOL_GPL(rpc_put_sb_net); 1099EXPORT_SYMBOL_GPL(rpc_put_sb_net);
@@ -1152,14 +1152,19 @@ static void rpc_kill_sb(struct super_block *sb)
1152 struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); 1152 struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);
1153 1153
1154 mutex_lock(&sn->pipefs_sb_lock); 1154 mutex_lock(&sn->pipefs_sb_lock);
1155 if (sn->pipefs_sb != sb) {
1156 mutex_unlock(&sn->pipefs_sb_lock);
1157 goto out;
1158 }
1155 sn->pipefs_sb = NULL; 1159 sn->pipefs_sb = NULL;
1156 mutex_unlock(&sn->pipefs_sb_lock); 1160 mutex_unlock(&sn->pipefs_sb_lock);
1157 put_net(net);
1158 dprintk("RPC: sending pipefs UMOUNT notification for net %p%s\n", 1161 dprintk("RPC: sending pipefs UMOUNT notification for net %p%s\n",
1159 net, NET_NAME(net)); 1162 net, NET_NAME(net));
1160 blocking_notifier_call_chain(&rpc_pipefs_notifier_list, 1163 blocking_notifier_call_chain(&rpc_pipefs_notifier_list,
1161 RPC_PIPEFS_UMOUNT, 1164 RPC_PIPEFS_UMOUNT,
1162 sb); 1165 sb);
1166 put_net(net);
1167out:
1163 kill_litter_super(sb); 1168 kill_litter_super(sb);
1164} 1169}
1165 1170