From 35edb9dbfe382b5433071a6d05be15136338bdc6 Mon Sep 17 00:00:00 2001 From: Rachita Kothiyal Date: Tue, 20 May 2008 00:40:29 -0400 Subject: [PATCH] Unionfs ODF: Fix a lockdep recursive lock warning in exports With exports, another layer of locking gets introduced. In rename, the following is the case: lock_rename (nfs_rename) lock_rename (odf_rename) Since the locks belong to different file systems, it's not a real issue. Hence turning lockdep off momentarily is safe here (maybe not the cleanest solution). Signed-off-by: Rachita Kothiyal --- fs/unionfs/odf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/unionfs/odf.c b/fs/unionfs/odf.c index 5989670512..c6b9ae8062 100644 --- a/fs/unionfs/odf.c +++ b/fs/unionfs/odf.c @@ -505,6 +505,8 @@ int odf_rename(struct dentry *old_dentry, struct dentry *new_dentry) /* this should never happen */ BUG_ON(new_odfdentry->d_inode); + /* see Documentation/filesystems/unionfs/issues.txt */ + lockdep_off(); lock_rename(old_dir, new_dir); current->fsuid = 0; current->fsgid = 0; @@ -512,6 +514,7 @@ int odf_rename(struct dentry *old_dentry, struct dentry *new_dentry) old_odfdentry, new_dir->d_inode, new_odfdentry); unlock_rename(old_dir, new_dir); + lockdep_on(); current->fsuid = olduid; current->fsgid = oldgid; dput(new_odfdentry); -- 2.43.0