+ fs-bufferc-remove-unnecessary-init-operation-after-allocating-buffer_head.patch added to -mm tree

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

 



The patch titled
     Subject: fs/buffer.c: remove unnecessary init operation after allocating buffer_head.
has been added to the -mm tree.  Its filename is
     fs-bufferc-remove-unnecessary-init-operation-after-allocating-buffer_head.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: majianpeng <majianpeng@xxxxxxxxx>
Subject: fs/buffer.c: remove unnecessary init operation after allocating buffer_head.

bh allocation uses kmem_cache_zalloc() so we needn't call 'init_buffer(bh,
NULL, NULL)' and perform other set-zero-operations.

Signed-off-by: Jianpeng Ma <majianpeng@xxxxxxxxx>
Cc: Jan Kara <jack@xxxxxxx>
Cc: Theodore Ts'o <tytso@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/buffer.c       |    2 --
 fs/jbd/journal.c  |    2 --
 fs/jbd2/journal.c |    2 --
 3 files changed, 6 deletions(-)

diff -puN fs/buffer.c~fs-bufferc-remove-unnecessary-init-operation-after-allocating-buffer_head fs/buffer.c
--- a/fs/buffer.c~fs-bufferc-remove-unnecessary-init-operation-after-allocating-buffer_head
+++ a/fs/buffer.c
@@ -865,8 +865,6 @@ try_again:
 
 		/* Link the buffer to its page */
 		set_bh_page(bh, page, offset);
-
-		init_buffer(bh, NULL, NULL);
 	}
 	return head;
 /*
diff -puN fs/jbd/journal.c~fs-bufferc-remove-unnecessary-init-operation-after-allocating-buffer_head fs/jbd/journal.c
--- a/fs/jbd/journal.c~fs-bufferc-remove-unnecessary-init-operation-after-allocating-buffer_head
+++ a/fs/jbd/journal.c
@@ -310,8 +310,6 @@ int journal_write_metadata_buffer(transa
 
 	new_bh = alloc_buffer_head(GFP_NOFS|__GFP_NOFAIL);
 	/* keep subsequent assertions sane */
-	new_bh->b_state = 0;
-	init_buffer(new_bh, NULL, NULL);
 	atomic_set(&new_bh->b_count, 1);
 	new_jh = journal_add_journal_head(new_bh);	/* This sleeps */
 
diff -puN fs/jbd2/journal.c~fs-bufferc-remove-unnecessary-init-operation-after-allocating-buffer_head fs/jbd2/journal.c
--- a/fs/jbd2/journal.c~fs-bufferc-remove-unnecessary-init-operation-after-allocating-buffer_head
+++ a/fs/jbd2/journal.c
@@ -367,8 +367,6 @@ retry_alloc:
 	}
 
 	/* keep subsequent assertions sane */
-	new_bh->b_state = 0;
-	init_buffer(new_bh, NULL, NULL);
 	atomic_set(&new_bh->b_count, 1);
 	new_jh = jbd2_journal_add_journal_head(new_bh);	/* This sleeps */
 
_

Patches currently in -mm which might be from majianpeng@xxxxxxxxx are

linux-next.patch
fs-block_devc-fix-iov_shorten-criteria-in-blkdev_aio_read.patch
fs-bufferc-remove-unnecessary-init-operation-after-allocating-buffer_head.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