[2/6] Add missing fs_error() in sector functions
diff mbox series

Message ID 20191009133157.14028-3-philipp.ammann@posteo.de
State New
Headers show
Series
  • Various exfat fixes
Related show

Commit Message

Philipp Ammann Oct. 9, 2019, 1:31 p.m. UTC
From: Andreas Schneider <asn@cryptomilk.org>

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
---
 drivers/staging/exfat/exfat_core.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

Patch
diff mbox series

diff --git a/drivers/staging/exfat/exfat_core.c b/drivers/staging/exfat/exfat_core.c
index eef9e2726b6b..043091565578 100644
--- a/drivers/staging/exfat/exfat_core.c
+++ b/drivers/staging/exfat/exfat_core.c
@@ -3616,8 +3616,10 @@  int sector_read(struct super_block *sb, sector_t sec, struct buffer_head **bh,
 
 	if (!p_fs->dev_ejected) {
 		ret = bdev_read(sb, sec, bh, 1, read);
-		if (ret != FFS_SUCCESS)
+		if (ret != FFS_SUCCESS) {
+			fs_error(sb);
 			p_fs->dev_ejected = 1;
+		}
 	}
 
 	return ret;
@@ -3645,8 +3647,10 @@  int sector_write(struct super_block *sb, sector_t sec, struct buffer_head *bh,
 
 	if (!p_fs->dev_ejected) {
 		ret = bdev_write(sb, sec, bh, 1, sync);
-		if (ret != FFS_SUCCESS)
+		if (ret != FFS_SUCCESS) {
+			fs_error(sb);
 			p_fs->dev_ejected = 1;
+		}
 	}
 
 	return ret;
@@ -3668,8 +3672,10 @@  int multi_sector_read(struct super_block *sb, sector_t sec,
 
 	if (!p_fs->dev_ejected) {
 		ret = bdev_read(sb, sec, bh, num_secs, read);
-		if (ret != FFS_SUCCESS)
+		if (ret != FFS_SUCCESS) {
+			fs_error(sb);
 			p_fs->dev_ejected = 1;
+		}
 	}
 
 	return ret;
@@ -3696,8 +3702,10 @@  int multi_sector_write(struct super_block *sb, sector_t sec,
 
 	if (!p_fs->dev_ejected) {
 		ret = bdev_write(sb, sec, bh, num_secs, sync);
-		if (ret != FFS_SUCCESS)
+		if (ret != FFS_SUCCESS) {
+			fs_error(sb);
 			p_fs->dev_ejected = 1;
+		}
 	}
 
 	return ret;