ext4: add trace exit in exception path.
authorZhang Qilong <zhangqilong3@huawei.com>
Mon, 21 Sep 2020 12:47:38 +0000 (20:47 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 18 Oct 2020 14:36:59 +0000 (10:36 -0400)
Missing trace exit in exception path of ext4_sync_file and
ext4_ind_map_blocks.

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20200921124738.23352-1-zhangqilong3@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/fsync.c
fs/ext4/indirect.c

index 1d668c8..6476994 100644 (file)
@@ -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:
index a56ce38..23e504a 100644 (file)
@@ -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 */