Commit 25f51ea8 authored by Jinliang Zheng's avatar Jinliang Zheng Committed by Theodore Ts'o
Browse files

ext4: disambiguate the return value of ext4_dio_write_end_io()



The commit 91562895 ("ext4: properly sync file size update after O_SYNC
direct IO") causes confusion about the meaning of the return value of
ext4_dio_write_end_io().

Specifically, when the ext4_handle_inode_extension() operation succeeds,
ext4_dio_write_end_io() directly returns count instead of 0.

This does not cause a bug in the current kernel, but the semantics of the
return value of the ext4_dio_write_end_io() function are wrong, which is
likely to introduce bugs in the future code evolution.

Signed-off-by: default avatarJinliang Zheng <alexjlzheng@tencent.com>
Reviewed-by: default avatarZhang Yi <yi.zhang@huawei.com>
Link: https://patch.msgid.link/20240919082539.381626-1-alexjlzheng@tencent.com


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 813f8536
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment