diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2013-06-19 06:19:17 -0400 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-07-02 11:50:48 -0400 |
commit | e6da5d2ec9870ddadf4dbc6a1835470636df25bb (patch) | |
tree | 4c53df3c88c22037556469b0aecae994aeabcda1 /fs/btrfs | |
parent | f51a4a1826ff810eb9c00cadff8978b028c40756 (diff) |
Btrfs: cleanup redundant code in btrfs_submit_direct()
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/inode.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 4d7c02258390..0a43d42268f7 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -7148,7 +7148,6 @@ static void btrfs_submit_direct(int rw, struct bio *dio_bio, | |||
7148 | { | 7148 | { |
7149 | struct btrfs_root *root = BTRFS_I(inode)->root; | 7149 | struct btrfs_root *root = BTRFS_I(inode)->root; |
7150 | struct btrfs_dio_private *dip; | 7150 | struct btrfs_dio_private *dip; |
7151 | struct bio_vec *bvec = dio_bio->bi_io_vec; | ||
7152 | struct bio *io_bio; | 7151 | struct bio *io_bio; |
7153 | int skip_sum; | 7152 | int skip_sum; |
7154 | int write = rw & REQ_WRITE; | 7153 | int write = rw & REQ_WRITE; |
@@ -7170,16 +7169,9 @@ static void btrfs_submit_direct(int rw, struct bio *dio_bio, | |||
7170 | } | 7169 | } |
7171 | 7170 | ||
7172 | dip->private = dio_bio->bi_private; | 7171 | dip->private = dio_bio->bi_private; |
7173 | io_bio->bi_private = dio_bio->bi_private; | ||
7174 | dip->inode = inode; | 7172 | dip->inode = inode; |
7175 | dip->logical_offset = file_offset; | 7173 | dip->logical_offset = file_offset; |
7176 | 7174 | dip->bytes = dio_bio->bi_size; | |
7177 | dip->bytes = 0; | ||
7178 | do { | ||
7179 | dip->bytes += bvec->bv_len; | ||
7180 | bvec++; | ||
7181 | } while (bvec <= (dio_bio->bi_io_vec + dio_bio->bi_vcnt - 1)); | ||
7182 | |||
7183 | dip->disk_bytenr = (u64)dio_bio->bi_sector << 9; | 7175 | dip->disk_bytenr = (u64)dio_bio->bi_sector << 9; |
7184 | io_bio->bi_private = dip; | 7176 | io_bio->bi_private = dip; |
7185 | dip->errors = 0; | 7177 | dip->errors = 0; |