SUNRPC: Ensure rpc_fill_super sets sb->s_fs_info before calling notifiers
Subsystems (3)
PATCH 1/1 SUNRPC: Ensure rpc_fill_super sets sb->s_fs_info before calling notifiers
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 <[email protected]>
--- net/sunrpc/rpc_pipe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/sunrpc/rpc_pipe.c +2 -1
@@ -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; }
Signature · 1 line
1.9.3