+ reiser4-use-list_empty-instead-of-list_empty_careful-for.patch added to -mm tree

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

 



The patch titled
     reiser4: use list_empty instead of list_empty_careful for blocknr_set
has been added to the -mm tree.  Its filename is
     reiser4-use-list_empty-instead-of-list_empty_careful-for.patch

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

------------------------------------------------------
Subject: reiser4: use list_empty instead of list_empty_careful for blocknr_set
From: Edward Shishkin <edward@xxxxxxxxxxx>

this patch addresses the following todo item:

  > blocknr_set_add() modifies a list_head without any apparent
  > locking. Certainly without any _documented_ locking...
  > Ditto blocknr_set_destroy(). I'm sure there's locking, but
  > it's harder than it should be to work out what it is.
  > Given that proper locking is in place, the filesystem seems
  > to use list_*_careful() a lot more than is necessary?

Use list_empty() instead of list_empty_careful() for
reiser4 blocknr sets protected by atom lock.

Signed-off-by: Edward Shishkin <edward@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/reiser4/blocknrset.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff -puN fs/reiser4/blocknrset.c~reiser4-use-list_empty-instead-of-list_empty_careful-for fs/reiser4/blocknrset.c
--- a/fs/reiser4/blocknrset.c~reiser4-use-list_empty-instead-of-list_empty_careful-for
+++ a/fs/reiser4/blocknrset.c
@@ -28,6 +28,9 @@
  * extent; atom's wandered map is also stored as a blocknr set, blocknr pairs
  * there represent a (real block) -> (wandered block) mapping. */
 
+/* Protection: blocknr sets belong to reiser4 atom, and
+ * their modifications are performed with the atom lock held */
+
 typedef struct blocknr_pair blocknr_pair;
 
 /* The total size of a blocknr_set_entry. */
@@ -231,7 +234,7 @@ void blocknr_set_destroy(struct list_hea
 {
 	blocknr_set_entry *bse;
 
-	while (!list_empty_careful(bset)) {
+	while (!list_empty(bset)) {
 		bse = list_entry(bset->next, blocknr_set_entry, link);
 		list_del_init(&bse->link);
 		bse_free(bse);
@@ -253,10 +256,10 @@ void blocknr_set_merge(struct list_head 
 	blocknr_set_entry *bse_into = NULL;
 
 	/* If @from is empty, no work to perform. */
-	if (list_empty_careful(from))
+	if (list_empty(from))
 		return;
 	/* If @into is not empty, try merging partial-entries. */
-	if (!list_empty_careful(into)) {
+	if (!list_empty(into)) {
 
 		/* Neither set is empty, pop the front to members and try to combine them. */
 		blocknr_set_entry *bse_from;
_

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

reiser4-vs-streamline-generic_file_-interfaces-and-filemap-fix.patch
reiser4-rename-generic_sounding_globalspatch.patch
reiser4-format-subversion-numbers-heir-set-and-file-conversion.patch
reiser4-cleanups-in-lzo-compression-library.patch
reiser4-get-rid-of-deprecated-crypto-api.patch
reiser4-get-rid-of-deprecated-crypto-api-build-fix.patch
reiser4-use-list_head-instead-of-struct-blocknr.patch
reiser4-use-list_empty-instead-of-list_empty_careful-for.patch
reiser4-fix-missed-unlock-and-exit_context.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