]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/xfs/xfs_ioctl.c
xfs: always hold the iolock when calling xfs_change_file_space
[karo-tx-linux.git] / fs / xfs / xfs_ioctl.c
index 5a57e0c80b6b9fcc1b26b7150a67117c6f30ef65..45287419dc3719934d774373640358fd8c67dce5 100644 (file)
@@ -670,7 +670,9 @@ xfs_ioc_space(
        error = mnt_want_write_file(filp);
        if (error)
                return error;
+       xfs_ilock(ip, XFS_IOLOCK_EXCL);
        error = xfs_change_file_space(ip, cmd, bf, filp->f_pos, attr_flags);
+       xfs_iunlock(ip, XFS_IOLOCK_EXCL);
        mnt_drop_write_file(filp);
        return -error;
 }