2020-09-21 12:41:26

by Zhang Qilong

[permalink] [raw]
Subject: [PATCH -next] ext4: add trace exit in exception path.

From: Zhang Qilong <[email protected]>

Missing trace exit in exception path of ext4_sync_file and
ext4_ind_map_blocks.

Signed-off-by: Zhang Qilong <[email protected]>
---
fs/ext4/fsync.c | 2 +-
fs/ext4/indirect.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c
index 1d668c8f131f..6476994d9861 100644
--- a/fs/ext4/fsync.c
+++ b/fs/ext4/fsync.c
@@ -150,7 +150,7 @@ int ext4_sync_file(struct file *file, loff_t start, loff_t end, int datasync)

ret = file_write_and_wait_range(file, start, end);
if (ret)
- return ret;
+ goto out;

/*
* data=writeback,ordered:
diff --git a/fs/ext4/indirect.c b/fs/ext4/indirect.c
index 80c9f33800be..1da12c44d6fe 100644
--- a/fs/ext4/indirect.c
+++ b/fs/ext4/indirect.c
@@ -593,7 +593,8 @@ int ext4_ind_map_blocks(handle_t *handle, struct inode *inode,
if (ext4_has_feature_bigalloc(inode->i_sb)) {
EXT4_ERROR_INODE(inode, "Can't allocate blocks for "
"non-extent mapped inodes with bigalloc");
- return -EFSCORRUPTED;
+ err = -EFSCORRUPTED;
+ goto out;
}

/* Set up for the direct block allocation */
--
2.17.1


2020-10-03 04:55:30

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH -next] ext4: add trace exit in exception path.

On Mon, Sep 21, 2020 at 08:47:38PM +0800, Qilong Zhang wrote:
> From: Zhang Qilong <[email protected]>
>
> Missing trace exit in exception path of ext4_sync_file and
> ext4_ind_map_blocks.
>
> Signed-off-by: Zhang Qilong <[email protected]>

Thanks, applied.

- Ted