- configfs-consolidate-locking-around-configfs_detach_prep-in-configfs_rmdir.patch removed from -mm tree

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

 



The patch titled
     configfs: consolidate locking around configfs_detach_prep() in configfs_rmdir()
has been removed from the -mm tree.  Its filename was
     configfs-consolidate-locking-around-configfs_detach_prep-in-configfs_rmdir.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: configfs: consolidate locking around configfs_detach_prep() in configfs_rmdir()
From: Louis Rilling <louis.rilling@xxxxxxxxxxx>

It appears that configfs_rmdir() can protect configfs_detach_prep()
retries with less calls to {spin,mutex}_{lock,unlock}, and cleaner code.

This patch does not change any behavior, except that it removes two
useless lock/unlock pairs having nothing inside to protect and providing a
useless barrier.

Signed-off-by: Louis Rilling <louis.rilling@xxxxxxxxxxx>
Cc: Joel Becker <Joel.Becker@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/configfs/dir.c |   17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff -puN fs/configfs/dir.c~configfs-consolidate-locking-around-configfs_detach_prep-in-configfs_rmdir fs/configfs/dir.c
--- a/fs/configfs/dir.c~configfs-consolidate-locking-around-configfs_detach_prep-in-configfs_rmdir
+++ a/fs/configfs/dir.c
@@ -1311,16 +1311,18 @@ static int configfs_rmdir(struct inode *
 	 * Ensure that no racing symlink() will make detach_prep() fail while
 	 * the new link is temporarily attached
 	 */
-	mutex_lock(&configfs_symlink_mutex);
-	spin_lock(&configfs_dirent_lock);
 	do {
 		struct mutex *wait_mutex;
 
+		mutex_lock(&configfs_symlink_mutex);
+		spin_lock(&configfs_dirent_lock);
 		ret = configfs_detach_prep(dentry, &wait_mutex);
-		if (ret) {
+		if (ret)
 			configfs_detach_rollback(dentry);
-			spin_unlock(&configfs_dirent_lock);
-			mutex_unlock(&configfs_symlink_mutex);
+		spin_unlock(&configfs_dirent_lock);
+		mutex_unlock(&configfs_symlink_mutex);
+
+		if (ret) {
 			if (ret != -EAGAIN) {
 				config_item_put(parent_item);
 				return ret;
@@ -1329,13 +1331,8 @@ static int configfs_rmdir(struct inode *
 			/* Wait until the racing operation terminates */
 			mutex_lock(wait_mutex);
 			mutex_unlock(wait_mutex);
-
-			mutex_lock(&configfs_symlink_mutex);
-			spin_lock(&configfs_dirent_lock);
 		}
 	} while (ret == -EAGAIN);
-	spin_unlock(&configfs_dirent_lock);
-	mutex_unlock(&configfs_symlink_mutex);
 
 	/* Get a working ref for the duration of this function */
 	item = configfs_get_config_item(dentry);
_

Patches currently in -mm which might be from louis.rilling@xxxxxxxxxxx are

linux-next.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