diff options
author | Theodore Ts'o <tytso@mit.edu> | 2023-04-27 23:01:41 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2023-04-28 12:56:40 -0400 |
commit | d4fab7b28e2f5d74790d47a8d298da0abfb5132f (patch) | |
tree | f9157603e98e7db1583472478a4bbe9b4a4afe9d /fs/ext4/inode.c | |
parent | 3b50d5018ed06a647bb26c44bb5ae74e59c903c7 (diff) |
ext4: clean up error handling in __ext4_fill_super()
There were two ways to return an error code; one was via setting the
'err' variable, and the second, if err was zero, was via the 'ret'
variable. This was both confusing and fragile, and when code was
factored out of __ext4_fill_super(), some of the error codes returned
by the original code was replaced by -EINVAL, and in one case, the
error code was placed by 0, triggering a kernel null pointer
dereference.
Clean this up by removing the 'ret' variable, leaving only one way to
set the error code to be returned, and restore the errno codes that
were returned via the the mount system call as they were before we
started refactoring __ext4_fill_super().
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jason Yan <yanaijie@huawei.com>
Diffstat (limited to 'fs/ext4/inode.c')
0 files changed, 0 insertions, 0 deletions