Btrfs: reserve metadata space in btrfs_ioctl_setflags()
authorLi Zefan <lizf@cn.fujitsu.com>
Thu, 29 Dec 2011 05:39:50 +0000 (13:39 +0800)
committerLi Zefan <lizf@cn.fujitsu.com>
Wed, 11 Jan 2012 02:26:39 +0000 (10:26 +0800)
Check and reserve space for btrfs_update_inode().

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
fs/btrfs/ioctl.c

index 9619fb03a5d626251aeacdee53f77cf77eb03537..fe8a60c865ebe7107b79db2bef11cbf561f2c04b 100644 (file)
@@ -254,7 +254,7 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg)
                ip->flags &= ~(BTRFS_INODE_COMPRESS | BTRFS_INODE_NOCOMPRESS);
        }
 
-       trans = btrfs_join_transaction(root);
+       trans = btrfs_start_transaction(root, 1);
        if (IS_ERR(trans)) {
                ret = PTR_ERR(trans);
                goto out_drop;