+ i_mutex-does-not-need-to-be-locked-in-reiserfs_delete_inode.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     i_mutex does not need to be locked in reiserfs_delete_inode()

has been added to the -mm tree.  Its filename is

     i_mutex-does-not-need-to-be-locked-in-reiserfs_delete_inode.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: i_mutex does not need to be locked in reiserfs_delete_inode()
From: Alexander Zarochentsev <zam@xxxxxxxxxxx>

Fixes an i_mutex-inside-i_mutex lockdep nasty.

Signed-off-by: Alexander Zarochentsev <zam@xxxxxxxxxxx>
Cc: <reiserfs-dev@xxxxxxxxxxx>
Cc: Hans Reiser <reiser@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/reiserfs/inode.c |   12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff -puN fs/reiserfs/inode.c~i_mutex-does-not-need-to-be-locked-in-reiserfs_delete_inode fs/reiserfs/inode.c
--- a/fs/reiserfs/inode.c~i_mutex-does-not-need-to-be-locked-in-reiserfs_delete_inode
+++ a/fs/reiserfs/inode.c
@@ -39,14 +39,10 @@ void reiserfs_delete_inode(struct inode 
 
 	/* The = 0 happens when we abort creating a new inode for some reason like lack of space.. */
 	if (!(inode->i_state & I_NEW) && INODE_PKEY(inode)->k_objectid != 0) {	/* also handles bad_inode case */
-		mutex_lock(&inode->i_mutex);
-
 		reiserfs_delete_xattrs(inode);
 
-		if (journal_begin(&th, inode->i_sb, jbegin_count)) {
-			mutex_unlock(&inode->i_mutex);
+		if (journal_begin(&th, inode->i_sb, jbegin_count))
 			goto out;
-		}
 		reiserfs_update_inode_transaction(inode);
 
 		err = reiserfs_delete_object(&th, inode);
@@ -57,12 +53,8 @@ void reiserfs_delete_inode(struct inode 
 		if (!err) 
 			DQUOT_FREE_INODE(inode);
 
-		if (journal_end(&th, inode->i_sb, jbegin_count)) {
-			mutex_unlock(&inode->i_mutex);
+		if (journal_end(&th, inode->i_sb, jbegin_count))
 			goto out;
-		}
-
-		mutex_unlock(&inode->i_mutex);
 
 		/* check return value from reiserfs_delete_object after
 		 * ending the transaction
_

Patches currently in -mm which might be from zam@xxxxxxxxxxx are

i_mutex-does-not-need-to-be-locked-in-reiserfs_delete_inode.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux