From e15bd911784422f6cb5449f6fbd9f8051862b302 Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Sat, 30 Apr 2011 01:46:57 -0400 Subject: [PATCH] Unionfs: avoid lockdep warnings in show_options Due to namespace_sem lock taken. Signed-off-by: Erez Zadok --- fs/unionfs/super.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c index 59948841662..21a7d57db50 100644 --- a/fs/unionfs/super.c +++ b/fs/unionfs/super.c @@ -974,8 +974,9 @@ static int unionfs_show_options(struct seq_file *m, struct vfsmount *mnt) int bindex, bstart, bend; int perms; + /* to prevent a silly lockdep warning with namespace_sem */ + lockdep_off(); unionfs_read_lock(sb, UNIONFS_SMUTEX_CHILD); - unionfs_lock_dentry(sb->s_root, UNIONFS_DMUTEX_CHILD); tmp_page = (char *) __get_free_page(GFP_KERNEL); @@ -1010,8 +1011,8 @@ out: free_page((unsigned long) tmp_page); unionfs_unlock_dentry(sb->s_root); - unionfs_read_unlock(sb); + lockdep_on(); return ret; } -- 2.34.1