summaryrefslogtreecommitdiff
path: root/fs/nfs_common
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs_common')
-rw-r--r--fs/nfs_common/grace.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/nfs_common/grace.c b/fs/nfs_common/grace.c
index bd3e2d328e64..5be08f02a76b 100644
--- a/fs/nfs_common/grace.c
+++ b/fs/nfs_common/grace.c
@@ -30,7 +30,11 @@ locks_start_grace(struct net *net, struct lock_manager *lm)
struct list_head *grace_list = net_generic(net, grace_net_id);
spin_lock(&grace_lock);
- list_add(&lm->list, grace_list);
+ if (list_empty(&lm->list))
+ list_add(&lm->list, grace_list);
+ else
+ WARN(1, "double list_add attempt detected in net %x %s\n",
+ net->ns.inum, (net == &init_net) ? "(init_net)" : "");
spin_unlock(&grace_lock);
}
EXPORT_SYMBOL_GPL(locks_start_grace);