From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Mahoney Subject: [patch 92/99] btrfs: btrfs_add_ordered_operation should return void Date: Wed, 23 Nov 2011 19:37:05 -0500 Message-ID: <20111124004230.466957640@suse.com> References: <20111124003533.395674389@suse.com> To: Btrfs List Return-path: List-ID: btrfs_add_ordered_operation has no error conditions and should return void Signed-off-by: Jeff Mahoney --- fs/btrfs/ordered-data.c | 11 ++++------- fs/btrfs/ordered-data.h | 6 +++--- 2 files changed, 7 insertions(+), 10 deletions(-) --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c @@ -946,9 +946,8 @@ out: * If trans is not null, we'll do a friendly check for a transaction that * is already flushing things and force the IO down ourselves. */ -int btrfs_add_ordered_operation(struct btrfs_trans_handle *trans, - struct btrfs_root *root, - struct inode *inode) +void btrfs_add_ordered_operation(struct btrfs_trans_handle *trans, + struct btrfs_root *root, struct inode *inode) { u64 last_mod; @@ -959,7 +958,7 @@ int btrfs_add_ordered_operation(struct b * commit, we can safely return without doing anything */ if (last_mod < root->fs_info->last_trans_committed) - return 0; + return; /* * the transaction is already committing. Just start the IO and @@ -967,7 +966,7 @@ int btrfs_add_ordered_operation(struct b */ if (trans && root->fs_info->running_transaction->blocked) { btrfs_wait_ordered_range(inode, 0, (u64)-1); - return 0; + return; } spin_lock(&root->fs_info->ordered_extent_lock); @@ -976,6 +975,4 @@ int btrfs_add_ordered_operation(struct b &root->fs_info->ordered_operations); } spin_unlock(&root->fs_info->ordered_extent_lock); - - return 0; } --- a/fs/btrfs/ordered-data.h +++ b/fs/btrfs/ordered-data.h @@ -171,9 +171,9 @@ int btrfs_ordered_update_i_size(struct i struct btrfs_ordered_extent *ordered); int btrfs_find_ordered_sum(struct inode *inode, u64 offset, u64 disk_bytenr, u32 *sum); void btrfs_run_ordered_operations(struct btrfs_root *root, int wait); -int btrfs_add_ordered_operation(struct btrfs_trans_handle *trans, - struct btrfs_root *root, - struct inode *inode); +void btrfs_add_ordered_operation(struct btrfs_trans_handle *trans, + struct btrfs_root *root, + struct inode *inode); void btrfs_wait_ordered_extents(struct btrfs_root *root, int nocow_only, int delay_iput); #endif