diff options
author | Tsutomu Itoh <t-itoh@jp.fujitsu.com> | 2011-03-23 04:14:16 -0400 |
---|---|---|
committer | root <Chris Mason chris.mason@oracle.com> | 2011-03-28 05:37:35 -0400 |
commit | db5b493ac78e46c7b6bad22cd25d8041564cd8ea (patch) | |
tree | 18f484c3d8194b80165e5400831931a3ac5c58ba /fs/btrfs/ioctl.c | |
parent | 1abe9b8a138c9988ba8f7bfded6453649a31541f (diff) |
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>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index ad9b8c0e930b..88d3cb2eaf75 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -2350,12 +2350,15 @@ static noinline long btrfs_ioctl_start_sync(struct file *file, void __user *argp | |||
2350 | struct btrfs_root *root = BTRFS_I(file->f_dentry->d_inode)->root; | 2350 | struct btrfs_root *root = BTRFS_I(file->f_dentry->d_inode)->root; |
2351 | struct btrfs_trans_handle *trans; | 2351 | struct btrfs_trans_handle *trans; |
2352 | u64 transid; | 2352 | u64 transid; |
2353 | int ret; | ||
2353 | 2354 | ||
2354 | trans = btrfs_start_transaction(root, 0); | 2355 | trans = btrfs_start_transaction(root, 0); |
2355 | if (IS_ERR(trans)) | 2356 | if (IS_ERR(trans)) |
2356 | return PTR_ERR(trans); | 2357 | return PTR_ERR(trans); |
2357 | transid = trans->transid; | 2358 | transid = trans->transid; |
2358 | btrfs_commit_transaction_async(trans, root, 0); | 2359 | ret = btrfs_commit_transaction_async(trans, root, 0); |
2360 | if (ret) | ||
2361 | return ret; | ||
2359 | 2362 | ||
2360 | if (argp) | 2363 | if (argp) |
2361 | if (copy_to_user(argp, &transid, sizeof(transid))) | 2364 | if (copy_to_user(argp, &transid, sizeof(transid))) |