[Devel] [PATCH RHEL7 COMMIT] ms/fs: use mapping_set_error instead of opencoded set_bit

Konstantin Khorenko khorenko at virtuozzo.com
Mon Jun 18 12:07:42 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-862.3.2.vz7.61.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.3.2.vz7.61.3
------>
commit 4c5a0e61862873509866d793f4d427ffb2f30e49
Author: Vasily Averin <vvs at virtuozzo.com>
Date:   Mon Jun 18 12:07:42 2018 +0300

    ms/fs: use mapping_set_error instead of opencoded set_bit
    
    backported ext4_finish_bio hunk from mainline
      commit 5114a97a8bce7f4ead29a32b67dee85438699b9e
      Author: Michal Hocko <mhocko at suse.com>
      Date:   Tue Oct 11 13:56:01 2016 -0700
    
        fs: use mapping_set_error instead of opencoded set_bit
    
        The mapping_set_error() helper sets the correct AS_ flag for the mapping
        so there is no reason to open code it.  Use the helper directly.
    
        [akpm at linux-foundation.org: be honest about conversion from -ENXIO to -EIO]
        Link: http://lkml.kernel.org/r/20160912111608.2588-2-mhocko@kernel.org
        Signed-off-by: Michal Hocko <mhocko at suse.com>
        Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
        Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
    
    https://pmc.acronis.com/browse/VSTOR-10912
    Signed-off-by: Vasily Averin <vvs at virtuozzo.com>
---
 fs/ext4/page-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index a2e36861292d..174e76e2249f 100644
--- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c
@@ -80,7 +80,7 @@ static void ext4_finish_bio(struct bio *bio)
 
 		if (error) {
 			SetPageError(page);
-			set_bit(AS_EIO, &page->mapping->flags);
+			mapping_set_error(page->mapping, -EIO);
 		}
 		bh = head = page_buffers(page);
 		/*


More information about the Devel mailing list