aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index a85b90c86cb0..2bfdc641d4e3 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -36,6 +36,7 @@
36#include <linux/xattr.h> 36#include <linux/xattr.h>
37#include <linux/posix_acl.h> 37#include <linux/posix_acl.h>
38#include <linux/falloc.h> 38#include <linux/falloc.h>
39#include <linux/slab.h>
39#include "compat.h" 40#include "compat.h"
40#include "ctree.h" 41#include "ctree.h"
41#include "disk-io.h" 42#include "disk-io.h"
@@ -3943,7 +3944,7 @@ err:
3943 return ret; 3944 return ret;
3944} 3945}
3945 3946
3946int btrfs_write_inode(struct inode *inode, int wait) 3947int btrfs_write_inode(struct inode *inode, struct writeback_control *wbc)
3947{ 3948{
3948 struct btrfs_root *root = BTRFS_I(inode)->root; 3949 struct btrfs_root *root = BTRFS_I(inode)->root;
3949 struct btrfs_trans_handle *trans; 3950 struct btrfs_trans_handle *trans;
@@ -3952,7 +3953,7 @@ int btrfs_write_inode(struct inode *inode, int wait)
3952 if (root->fs_info->btree_inode == inode) 3953 if (root->fs_info->btree_inode == inode)
3953 return 0; 3954 return 0;
3954 3955
3955 if (wait) { 3956 if (wbc->sync_mode == WB_SYNC_ALL) {
3956 trans = btrfs_join_transaction(root, 1); 3957 trans = btrfs_join_transaction(root, 1);
3957 btrfs_set_trans_block_group(trans, inode); 3958 btrfs_set_trans_block_group(trans, inode);
3958 ret = btrfs_commit_transaction(trans, root); 3959 ret = btrfs_commit_transaction(trans, root);