Btrfs: cleanup some BUG_ON()
This patch changes some BUG_ON() to the error return. (but, most callers still use BUG_ON()) Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
@@ -2350,12 +2350,15 @@ static noinline long btrfs_ioctl_start_sync(struct file *file, void __user *argp
|
||||
struct btrfs_root *root = BTRFS_I(file->f_dentry->d_inode)->root;
|
||||
struct btrfs_trans_handle *trans;
|
||||
u64 transid;
|
||||
int ret;
|
||||
|
||||
trans = btrfs_start_transaction(root, 0);
|
||||
if (IS_ERR(trans))
|
||||
return PTR_ERR(trans);
|
||||
transid = trans->transid;
|
||||
btrfs_commit_transaction_async(trans, root, 0);
|
||||
ret = btrfs_commit_transaction_async(trans, root, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (argp)
|
||||
if (copy_to_user(argp, &transid, sizeof(transid)))
|
||||
|
Reference in New Issue
Block a user