Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ext4: release donor reference when EXT4_IOC_MOVE_EXT ioctl fails

When the EXT4_IOC_MOVE_EXT ioctl() fails on bigalloc file systems, we
should jump to the 'mext_out' label to release the donor file reference.

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

authored by

Djalal Harouni and committed by
Theodore Ts'o
9b687332 aaf7d73e

+2 -1
+2 -1
fs/ext4/ioctl.c
··· 258 258 EXT4_FEATURE_RO_COMPAT_BIGALLOC)) { 259 259 ext4_msg(sb, KERN_ERR, 260 260 "Online defrag not supported with bigalloc"); 261 - return -EOPNOTSUPP; 261 + err = -EOPNOTSUPP; 262 + goto mext_out; 262 263 } 263 264 264 265 err = mnt_want_write_file(filp);