summaryrefslogtreecommitdiffstats
path: root/fs/lockd/grace.c
diff options
context:
space:
mode:
authorStanislav Kinsbursky <skinsbursky@parallels.com>2012-07-25 16:57:22 +0400
committerJ. Bruce Fields <bfields@redhat.com>2012-07-27 16:49:22 -0400
commit5ccb0066f2d561549cc4d73d7f56b4ce3ca7a8a1 (patch)
tree43ca9eff5c94fc3609d858ce2a430c544fcc5f99 /fs/lockd/grace.c
parentdb9c4553412d72c6a05e0168d1d487f66e0660b3 (diff)
downloadblackbird-op-linux-5ccb0066f2d561549cc4d73d7f56b4ce3ca7a8a1.tar.gz
blackbird-op-linux-5ccb0066f2d561549cc4d73d7f56b4ce3ca7a8a1.zip
LockD: pass actual network namespace to grace period management functions
Passed network namespace replaced hard-coded init_net Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/lockd/grace.c')
-rw-r--r--fs/lockd/grace.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/lockd/grace.c b/fs/lockd/grace.c
index 8dbaff782098..6d1ee7204c88 100644
--- a/fs/lockd/grace.c
+++ b/fs/lockd/grace.c
@@ -21,9 +21,8 @@ static DEFINE_SPINLOCK(grace_lock);
*
* This function is called to start a grace period.
*/
-void locks_start_grace(struct lock_manager *lm)
+void locks_start_grace(struct net *net, struct lock_manager *lm)
{
- struct net *net = &init_net;
struct lockd_net *ln = net_generic(net, lockd_net_id);
spin_lock(&grace_lock);
@@ -57,9 +56,8 @@ EXPORT_SYMBOL_GPL(locks_end_grace);
* to answer ordinary lock requests, and when they should accept only
* lock reclaims.
*/
-int locks_in_grace(void)
+int locks_in_grace(struct net *net)
{
- struct net *net = &init_net;
struct lockd_net *ln = net_generic(net, lockd_net_id);
return !list_empty(&ln->grace_list);
OpenPOWER on IntegriCloud