lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180518123415.28181-11-jlayton@kernel.org>
Date:   Fri, 18 May 2018 08:34:14 -0400
From:   Jeff Layton <jlayton@...nel.org>
To:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     viro@...IV.linux.org.uk, willy@...radead.org, andres@...razel.de
Subject: [RFC PATCH 10/11] ext2: have sync_fs op report writeback errors when passed a since pointer

From: Jeff Layton <jlayton@...hat.com>

Signed-off-by: Jeff Layton <jlayton@...hat.com>
---
 fs/ext2/super.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 0700f3264c7e..51b548cfebb1 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -1264,6 +1264,7 @@ void ext2_sync_super(struct super_block *sb, struct ext2_super_block *es,
  */
 static int ext2_sync_fs(struct super_block *sb, int wait, errseq_t *since)
 {
+	int ret;
 	struct ext2_sb_info *sbi = EXT2_SB(sb);
 	struct ext2_super_block *es = EXT2_SB(sb)->s_es;
 
@@ -1280,7 +1281,13 @@ static int ext2_sync_fs(struct super_block *sb, int wait, errseq_t *since)
 	}
 	spin_unlock(&sbi->s_lock);
 	ext2_sync_super(sb, es, wait);
-	return __sync_blockdev(sb->s_bdev, wait);
+	ret = __sync_blockdev(sb->s_bdev, wait);
+	if (since) {
+		int ret2 = errseq_check_and_advance(&sb->s_wb_err, since);
+		if (ret == 0)
+			ret = ret2;
+	}
+	return ret;
 }
 
 static int ext2_freeze(struct super_block *sb)
-- 
2.17.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ