Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fs: sync: Avoid calling fdget without fdput
When adding fsync support, we check for fsync_enabled() in several cases but it appears that we should fdput() after fdget() but the current code just check for fsync_enabled and directly return in some cases after calling fdget(). Fix it by checking fsync_enabled first and move the f initialization after the check. Also remove some unnecessary fsync_enabled checks as this will be checked later in do_fsync(). Signed-off-by: Wang Han <416810799@qq.com> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
- Loading branch information