aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/rpc_pipe.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-09 15:09:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-09 15:09:43 -0400
commitbe0c5d8c0bb0023e11f5c6d38e90f7b0f24edb64 (patch)
tree6d7a6e290f8ed2f2ca250965a8debdd9f02a9cc9 /net/sunrpc/rpc_pipe.c
parent1f792dd1765e6f047ecd2d5f6a81f025b50d471a (diff)
parent959d921f5eb8878ea16049a7f6e9bcbb6dfbcb88 (diff)
Merge tag 'nfs-for-3.11-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust: "Feature highlights include: - Add basic client support for NFSv4.2 - Add basic client support for Labeled NFS (selinux for NFSv4.2) - Fix the use of credentials in NFSv4.1 stateful operations, and add support for NFSv4.1 state protection. Bugfix highlights: - Fix another NFSv4 open state recovery race - Fix an NFSv4.1 back channel session regression - Various rpc_pipefs races - Fix another issue with NFSv3 auth negotiation Please note that Labeled NFS does require some additional support from the security subsystem. The relevant changesets have all been reviewed and acked by James Morris." * tag 'nfs-for-3.11-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (54 commits) NFS: Set NFS_CS_MIGRATION for NFSv4 mounts NFSv4.1 Refactor nfs4_init_session and nfs4_init_channel_attrs nfs: have NFSv3 try server-specified auth flavors in turn nfs: have nfs_mount fake up a auth_flavs list when the server didn't provide it nfs: move server_authlist into nfs_try_mount_request nfs: refactor "need_mount" code out of nfs_try_mount SUNRPC: PipeFS MOUNT notification optimization for dying clients SUNRPC: split client creation routine into setup and registration SUNRPC: fix races on PipeFS UMOUNT notifications SUNRPC: fix races on PipeFS MOUNT notifications NFSv4.1 use pnfs_device maxcount for the objectlayout gdia_maxcount NFSv4.1 use pnfs_device maxcount for the blocklayout gdia_maxcount NFSv4.1 Fix gdia_maxcount calculation to fit in ca_maxresponsesize NFS: Improve legacy idmapping fallback NFSv4.1 end back channel session draining NFS: Apply v4.1 capabilities to v4.2 NFSv4.1: Clean up layout segment comparison helper names NFSv4.1: layout segment comparison helpers should take 'const' parameters NFSv4: Move the DNS resolver into the NFSv4 module rpc_pipefs: only set rpc_dentry_ops if d_op isn't already set ...
Diffstat (limited to 'net/sunrpc/rpc_pipe.c')
-rw-r--r--net/sunrpc/rpc_pipe.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index e7ce4b3eb0bd..4679df5a6d50 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -667,7 +667,8 @@ static struct dentry *__rpc_lookup_create_exclusive(struct dentry *parent,
667 return ERR_PTR(-ENOMEM); 667 return ERR_PTR(-ENOMEM);
668 } 668 }
669 if (dentry->d_inode == NULL) { 669 if (dentry->d_inode == NULL) {
670 d_set_d_op(dentry, &rpc_dentry_operations); 670 if (!dentry->d_op)
671 d_set_d_op(dentry, &rpc_dentry_operations);
671 return dentry; 672 return dentry;
672 } 673 }
673 dput(dentry); 674 dput(dentry);
@@ -1126,6 +1127,7 @@ rpc_fill_super(struct super_block *sb, void *data, int silent)
1126 return -ENOMEM; 1127 return -ENOMEM;
1127 dprintk("RPC: sending pipefs MOUNT notification for net %p%s\n", 1128 dprintk("RPC: sending pipefs MOUNT notification for net %p%s\n",
1128 net, NET_NAME(net)); 1129 net, NET_NAME(net));
1130 mutex_lock(&sn->pipefs_sb_lock);
1129 sn->pipefs_sb = sb; 1131 sn->pipefs_sb = sb;
1130 err = blocking_notifier_call_chain(&rpc_pipefs_notifier_list, 1132 err = blocking_notifier_call_chain(&rpc_pipefs_notifier_list,
1131 RPC_PIPEFS_MOUNT, 1133 RPC_PIPEFS_MOUNT,
@@ -1133,6 +1135,7 @@ rpc_fill_super(struct super_block *sb, void *data, int silent)
1133 if (err) 1135 if (err)
1134 goto err_depopulate; 1136 goto err_depopulate;
1135 sb->s_fs_info = get_net(net); 1137 sb->s_fs_info = get_net(net);
1138 mutex_unlock(&sn->pipefs_sb_lock);
1136 return 0; 1139 return 0;
1137 1140
1138err_depopulate: 1141err_depopulate:
@@ -1141,6 +1144,7 @@ err_depopulate:
1141 sb); 1144 sb);
1142 sn->pipefs_sb = NULL; 1145 sn->pipefs_sb = NULL;
1143 __rpc_depopulate(root, files, RPCAUTH_lockd, RPCAUTH_RootEOF); 1146 __rpc_depopulate(root, files, RPCAUTH_lockd, RPCAUTH_RootEOF);
1147 mutex_unlock(&sn->pipefs_sb_lock);
1144 return err; 1148 return err;
1145} 1149}
1146 1150
@@ -1162,12 +1166,12 @@ static void rpc_kill_sb(struct super_block *sb)
1162 goto out; 1166 goto out;
1163 } 1167 }
1164 sn->pipefs_sb = NULL; 1168 sn->pipefs_sb = NULL;
1165 mutex_unlock(&sn->pipefs_sb_lock);
1166 dprintk("RPC: sending pipefs UMOUNT notification for net %p%s\n", 1169 dprintk("RPC: sending pipefs UMOUNT notification for net %p%s\n",
1167 net, NET_NAME(net)); 1170 net, NET_NAME(net));
1168 blocking_notifier_call_chain(&rpc_pipefs_notifier_list, 1171 blocking_notifier_call_chain(&rpc_pipefs_notifier_list,
1169 RPC_PIPEFS_UMOUNT, 1172 RPC_PIPEFS_UMOUNT,
1170 sb); 1173 sb);
1174 mutex_unlock(&sn->pipefs_sb_lock);
1171 put_net(net); 1175 put_net(net);
1172out: 1176out:
1173 kill_litter_super(sb); 1177 kill_litter_super(sb);