diff options
author | Jan Kara <jack@suse.cz> | 2019-03-11 15:27:02 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2019-03-18 16:30:02 +0100 |
commit | 2b42be5eb24564227b15e66f54f088e5a26549c7 (patch) | |
tree | eeb32b8731b61f2ce1fb54ed52cc2a3801d2d1b7 /fs/udf/inode.c | |
parent | d3ca4651d05c0ff7259d087d8c949bcf3e14fb46 (diff) |
udf: Propagate errors from udf_truncate_extents()
Make udf_truncate_extents() properly propagate errors to its callers and
let udf_setsize() handle the error properly as well. This lets userspace
know in case there's some error when truncating blocks.
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/inode.c')
-rw-r--r-- | fs/udf/inode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/udf/inode.c b/fs/udf/inode.c index ae796e10f68b..e7276932e433 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c @@ -1242,8 +1242,10 @@ set_size: truncate_setsize(inode, newsize); down_write(&iinfo->i_data_sem); udf_clear_extent_cache(inode); - udf_truncate_extents(inode); + err = udf_truncate_extents(inode); up_write(&iinfo->i_data_sem); + if (err) + return err; } update_time: inode->i_mtime = inode->i_ctime = current_time(inode); |