Message ID | 20191213185010.6k7yl2tck3wlsdkt@kili.mountain |
---|---|
State | Accepted |
Headers | show |
Series | ext4: unlock on error in ext4_expand_extra_isize() | expand |
On Fri, Dec 13, 2019 at 09:50:11PM +0300, Dan Carpenter wrote: > We need to unlock the xattr before returning on this error path. > > Fixes: c03b45b853f5 ("ext4, project: expand inode extra size if possible") > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Thanks, applied. - Ted
Hi, Dan Carpenter I forgot to reply your mail because I'm busy recently. Sorry. Thanks for your fix. Regards Miao on 2019/12/14 at 2:50, Dan Carpenter wrote: > We need to unlock the xattr before returning on this error path. > > Fixes: c03b45b853f5 ("ext4, project: expand inode extra size if possible") > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > --- > fs/ext4/inode.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c > index 28f28de0c1b6..629a25d999f0 100644 > --- a/fs/ext4/inode.c > +++ b/fs/ext4/inode.c > @@ -5692,7 +5692,7 @@ int ext4_expand_extra_isize(struct inode *inode, > error = ext4_journal_get_write_access(handle, iloc->bh); > if (error) { > brelse(iloc->bh); > - goto out_stop; > + goto out_unlock; > } > > error = __ext4_expand_extra_isize(inode, new_extra_isize, iloc, > @@ -5702,8 +5702,8 @@ int ext4_expand_extra_isize(struct inode *inode, > if (!error) > error = rc; > > +out_unlock: > ext4_write_unlock_xattr(inode, &no_expand); > -out_stop: > ext4_journal_stop(handle); > return error; > } >
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 28f28de0c1b6..629a25d999f0 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -5692,7 +5692,7 @@ int ext4_expand_extra_isize(struct inode *inode, error = ext4_journal_get_write_access(handle, iloc->bh); if (error) { brelse(iloc->bh); - goto out_stop; + goto out_unlock; } error = __ext4_expand_extra_isize(inode, new_extra_isize, iloc, @@ -5702,8 +5702,8 @@ int ext4_expand_extra_isize(struct inode *inode, if (!error) error = rc; +out_unlock: ext4_write_unlock_xattr(inode, &no_expand); -out_stop: ext4_journal_stop(handle); return error; }
We need to unlock the xattr before returning on this error path. Fixes: c03b45b853f5 ("ext4, project: expand inode extra size if possible") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- fs/ext4/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)