From: Rachita Kothiyal Date: Tue, 20 May 2008 04:40:29 +0000 (-0400) Subject: Unionfs ODF: Fix a lockdep recursive lock warning in exports X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;ds=sidebyside;p=unionfs-odf.git 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 --- 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);