mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
jbd2: improve comments about freeing data buffers whose page mapping is NULL
commit 780f66e59231fcf882f36c63f287252ee47cc75a upstream. Improve comments in jbd2_journal_commit_transaction() to describe why we don't need to clear the buffer_mapped bit for freeing file mapping buffers whose page mapping is NULL. Link: https://lore.kernel.org/r/[email protected] Fixes: c96dceeabf76 ("jbd2: do not clear the BH_Mapped flag when forgetting a metadata buffer") Suggested-by: Jan Kara <[email protected]> Reviewed-by: Jan Kara <[email protected]> Signed-off-by: zhangyi (F) <[email protected]> Signed-off-by: Theodore Ts'o <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
8078d3af4a
commit
5815a5d70d
1 changed files with 4 additions and 3 deletions
|
|
@ -995,9 +995,10 @@ restart_loop:
|
|||
* journalled data) we need to unmap buffer and clear
|
||||
* more bits. We also need to be careful about the check
|
||||
* because the data page mapping can get cleared under
|
||||
* out hands, which alse need not to clear more bits
|
||||
* because the page and buffers will be freed and can
|
||||
* never be reused once we are done with them.
|
||||
* our hands. Note that if mapping == NULL, we don't
|
||||
* need to make buffer unmapped because the page is
|
||||
* already detached from the mapping and buffers cannot
|
||||
* get reused.
|
||||
*/
|
||||
mapping = READ_ONCE(bh->b_page->mapping);
|
||||
if (mapping && !sb_is_blkdev_sb(mapping->host->i_sb)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue