Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f6d2f6b3 authored by Eric Gouriou's avatar Eric Gouriou Committed by Theodore Ts'o
Browse files

ext4: fix unbalanced up_write() in ext4_ext_truncate() error path



ext4_ext_truncate() should not invoke up_write(&EXT4_I(inode)->i_data_sem)
when ext4_orphan_add() returns an error, as it hasn't performed a
down_write() yet. This trivial patch fixes this by moving the up_write()
invocation above the out_stop label.

Signed-off-by: default avatarEric Gouriou <egouriou@google.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 77f4135f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment