aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r--fs/f2fs/data.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 941f9b9ca3a5..2535d3b1a763 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -560,9 +560,9 @@ write:
560 inode_dec_dirty_dents(inode); 560 inode_dec_dirty_dents(inode);
561 err = do_write_data_page(page); 561 err = do_write_data_page(page);
562 } else { 562 } else {
563 int ilock = mutex_lock_op(sbi); 563 f2fs_lock_op(sbi);
564 err = do_write_data_page(page); 564 err = do_write_data_page(page);
565 mutex_unlock_op(sbi, ilock); 565 f2fs_unlock_op(sbi);
566 need_balance_fs = true; 566 need_balance_fs = true;
567 } 567 }
568 if (err == -ENOENT) 568 if (err == -ENOENT)
@@ -641,7 +641,6 @@ static int f2fs_write_begin(struct file *file, struct address_space *mapping,
641 pgoff_t index = ((unsigned long long) pos) >> PAGE_CACHE_SHIFT; 641 pgoff_t index = ((unsigned long long) pos) >> PAGE_CACHE_SHIFT;
642 struct dnode_of_data dn; 642 struct dnode_of_data dn;
643 int err = 0; 643 int err = 0;
644 int ilock;
645 644
646 f2fs_balance_fs(sbi); 645 f2fs_balance_fs(sbi);
647repeat: 646repeat:
@@ -650,7 +649,7 @@ repeat:
650 return -ENOMEM; 649 return -ENOMEM;
651 *pagep = page; 650 *pagep = page;
652 651
653 ilock = mutex_lock_op(sbi); 652 f2fs_lock_op(sbi);
654 653
655 set_new_dnode(&dn, inode, NULL, NULL, 0); 654 set_new_dnode(&dn, inode, NULL, NULL, 0);
656 err = get_dnode_of_data(&dn, index, ALLOC_NODE); 655 err = get_dnode_of_data(&dn, index, ALLOC_NODE);
@@ -664,7 +663,7 @@ repeat:
664 if (err) 663 if (err)
665 goto err; 664 goto err;
666 665
667 mutex_unlock_op(sbi, ilock); 666 f2fs_unlock_op(sbi);
668 667
669 if ((len == PAGE_CACHE_SIZE) || PageUptodate(page)) 668 if ((len == PAGE_CACHE_SIZE) || PageUptodate(page))
670 return 0; 669 return 0;
@@ -700,7 +699,7 @@ out:
700 return 0; 699 return 0;
701 700
702err: 701err:
703 mutex_unlock_op(sbi, ilock); 702 f2fs_unlock_op(sbi);
704 f2fs_put_page(page, 1); 703 f2fs_put_page(page, 1);
705 return err; 704 return err;
706} 705}