btrfs_add_ordered_operation has no error conditions and should return void

Signed-off-by: Jeff Mahoney <[email protected]>
---
 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


--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to