@@ -1414,12 +1414,12 @@ rpc_fill_super(struct super_block *sb, void *data, int silent)
net, NET_NAME(net));
mutex_lock(&sn->pipefs_sb_lock);
sn->pipefs_sb = sb;
+ sb->s_fs_info = get_net(net);
err = blocking_notifier_call_chain(&rpc_pipefs_notifier_list,
RPC_PIPEFS_MOUNT,
sb);
if (err)
goto err_depopulate;
- sb->s_fs_info = get_net(net);
mutex_unlock(&sn->pipefs_sb_lock);
return 0;
@@ -1431,6 +1431,7 @@ err_depopulate:
sn->pipefs_sb = NULL;
__rpc_depopulate(root, files, RPCAUTH_lockd, RPCAUTH_RootEOF);
mutex_unlock(&sn->pipefs_sb_lock);
+ put_net(net);
return err;
}
The rpc_pipefs event handlers expect the sb->s_fs_info field to contain the net namespace. Ensure that we set it before we call the notifier list. Fixes: 2d00131acc64 (SUNRPC: send notification events on pipefs sb creation...) Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> --- net/sunrpc/rpc_pipe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)