diff options
-rw-r--r-- | fs/f2fs/acl.c | 2 | ||||
-rw-r--r-- | fs/f2fs/dir.c | 6 | ||||
-rw-r--r-- | fs/f2fs/extent_cache.c | 2 | ||||
-rw-r--r-- | fs/f2fs/f2fs.h | 24 | ||||
-rw-r--r-- | fs/f2fs/file.c | 8 | ||||
-rw-r--r-- | fs/f2fs/inline.c | 2 | ||||
-rw-r--r-- | fs/f2fs/inode.c | 9 | ||||
-rw-r--r-- | fs/f2fs/namei.c | 6 | ||||
-rw-r--r-- | fs/f2fs/super.c | 43 | ||||
-rw-r--r-- | fs/f2fs/xattr.c | 4 |
10 files changed, 62 insertions, 44 deletions
diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c index 6a414e75e705..4dcc9e28dc5c 100644 --- a/fs/f2fs/acl.c +++ b/fs/f2fs/acl.c | |||
@@ -384,7 +384,7 @@ int f2fs_init_acl(struct inode *inode, struct inode *dir, struct page *ipage, | |||
384 | if (error) | 384 | if (error) |
385 | return error; | 385 | return error; |
386 | 386 | ||
387 | mark_inode_dirty_sync(inode); | 387 | f2fs_mark_inode_dirty_sync(inode); |
388 | 388 | ||
389 | if (default_acl) { | 389 | if (default_acl) { |
390 | error = __f2fs_set_acl(inode, ACL_TYPE_DEFAULT, default_acl, | 390 | error = __f2fs_set_acl(inode, ACL_TYPE_DEFAULT, default_acl, |
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index 7ba52a04e13a..db4022f9c5b1 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c | |||
@@ -300,7 +300,7 @@ void f2fs_set_link(struct inode *dir, struct f2fs_dir_entry *de, | |||
300 | set_page_dirty(page); | 300 | set_page_dirty(page); |
301 | 301 | ||
302 | dir->i_mtime = dir->i_ctime = CURRENT_TIME; | 302 | dir->i_mtime = dir->i_ctime = CURRENT_TIME; |
303 | mark_inode_dirty_sync(dir); | 303 | f2fs_mark_inode_dirty_sync(dir); |
304 | f2fs_put_page(page, 1); | 304 | f2fs_put_page(page, 1); |
305 | } | 305 | } |
306 | 306 | ||
@@ -452,7 +452,7 @@ void update_parent_metadata(struct inode *dir, struct inode *inode, | |||
452 | clear_inode_flag(inode, FI_NEW_INODE); | 452 | clear_inode_flag(inode, FI_NEW_INODE); |
453 | } | 453 | } |
454 | dir->i_mtime = dir->i_ctime = CURRENT_TIME; | 454 | dir->i_mtime = dir->i_ctime = CURRENT_TIME; |
455 | mark_inode_dirty_sync(dir); | 455 | f2fs_mark_inode_dirty_sync(dir); |
456 | 456 | ||
457 | if (F2FS_I(dir)->i_current_depth != current_depth) | 457 | if (F2FS_I(dir)->i_current_depth != current_depth) |
458 | f2fs_i_depth_write(dir, current_depth); | 458 | f2fs_i_depth_write(dir, current_depth); |
@@ -704,7 +704,7 @@ void f2fs_delete_entry(struct f2fs_dir_entry *dentry, struct page *page, | |||
704 | set_page_dirty(page); | 704 | set_page_dirty(page); |
705 | 705 | ||
706 | dir->i_ctime = dir->i_mtime = CURRENT_TIME; | 706 | dir->i_ctime = dir->i_mtime = CURRENT_TIME; |
707 | mark_inode_dirty_sync(dir); | 707 | f2fs_mark_inode_dirty_sync(dir); |
708 | 708 | ||
709 | if (inode) | 709 | if (inode) |
710 | f2fs_drop_nlink(dir, inode); | 710 | f2fs_drop_nlink(dir, inode); |
diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c index e858869d76cb..5b4b6d426ebb 100644 --- a/fs/f2fs/extent_cache.c +++ b/fs/f2fs/extent_cache.c | |||
@@ -172,7 +172,7 @@ static void __drop_largest_extent(struct inode *inode, | |||
172 | 172 | ||
173 | if (fofs < largest->fofs + largest->len && fofs + len > largest->fofs) { | 173 | if (fofs < largest->fofs + largest->len && fofs + len > largest->fofs) { |
174 | largest->len = 0; | 174 | largest->len = 0; |
175 | mark_inode_dirty_sync(inode); | 175 | f2fs_mark_inode_dirty_sync(inode); |
176 | } | 176 | } |
177 | } | 177 | } |
178 | 178 | ||
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 88fa13909b9c..0e46dd0a09d3 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h | |||
@@ -506,12 +506,13 @@ static inline bool __is_front_mergeable(struct extent_info *cur, | |||
506 | return __is_extent_mergeable(cur, front); | 506 | return __is_extent_mergeable(cur, front); |
507 | } | 507 | } |
508 | 508 | ||
509 | extern void f2fs_mark_inode_dirty_sync(struct inode *); | ||
509 | static inline void __try_update_largest_extent(struct inode *inode, | 510 | static inline void __try_update_largest_extent(struct inode *inode, |
510 | struct extent_tree *et, struct extent_node *en) | 511 | struct extent_tree *et, struct extent_node *en) |
511 | { | 512 | { |
512 | if (en->ei.len > et->largest.len) { | 513 | if (en->ei.len > et->largest.len) { |
513 | et->largest = en->ei; | 514 | et->largest = en->ei; |
514 | mark_inode_dirty_sync(inode); | 515 | f2fs_mark_inode_dirty_sync(inode); |
515 | } | 516 | } |
516 | } | 517 | } |
517 | 518 | ||
@@ -1551,7 +1552,7 @@ static inline void __mark_inode_dirty_flag(struct inode *inode, | |||
1551 | return; | 1552 | return; |
1552 | case FI_DATA_EXIST: | 1553 | case FI_DATA_EXIST: |
1553 | case FI_INLINE_DOTS: | 1554 | case FI_INLINE_DOTS: |
1554 | mark_inode_dirty_sync(inode); | 1555 | f2fs_mark_inode_dirty_sync(inode); |
1555 | } | 1556 | } |
1556 | } | 1557 | } |
1557 | 1558 | ||
@@ -1578,7 +1579,7 @@ static inline void set_acl_inode(struct inode *inode, umode_t mode) | |||
1578 | { | 1579 | { |
1579 | F2FS_I(inode)->i_acl_mode = mode; | 1580 | F2FS_I(inode)->i_acl_mode = mode; |
1580 | set_inode_flag(inode, FI_ACL_MODE); | 1581 | set_inode_flag(inode, FI_ACL_MODE); |
1581 | mark_inode_dirty_sync(inode); | 1582 | f2fs_mark_inode_dirty_sync(inode); |
1582 | } | 1583 | } |
1583 | 1584 | ||
1584 | static inline void f2fs_i_links_write(struct inode *inode, bool inc) | 1585 | static inline void f2fs_i_links_write(struct inode *inode, bool inc) |
@@ -1587,7 +1588,7 @@ static inline void f2fs_i_links_write(struct inode *inode, bool inc) | |||
1587 | inc_nlink(inode); | 1588 | inc_nlink(inode); |
1588 | else | 1589 | else |
1589 | drop_nlink(inode); | 1590 | drop_nlink(inode); |
1590 | mark_inode_dirty_sync(inode); | 1591 | f2fs_mark_inode_dirty_sync(inode); |
1591 | } | 1592 | } |
1592 | 1593 | ||
1593 | static inline void f2fs_i_blocks_write(struct inode *inode, | 1594 | static inline void f2fs_i_blocks_write(struct inode *inode, |
@@ -1598,7 +1599,7 @@ static inline void f2fs_i_blocks_write(struct inode *inode, | |||
1598 | 1599 | ||
1599 | inode->i_blocks = add ? inode->i_blocks + diff : | 1600 | inode->i_blocks = add ? inode->i_blocks + diff : |
1600 | inode->i_blocks - diff; | 1601 | inode->i_blocks - diff; |
1601 | mark_inode_dirty_sync(inode); | 1602 | f2fs_mark_inode_dirty_sync(inode); |
1602 | if (clean || recover) | 1603 | if (clean || recover) |
1603 | set_inode_flag(inode, FI_AUTO_RECOVER); | 1604 | set_inode_flag(inode, FI_AUTO_RECOVER); |
1604 | } | 1605 | } |
@@ -1612,7 +1613,7 @@ static inline void f2fs_i_size_write(struct inode *inode, loff_t i_size) | |||
1612 | return; | 1613 | return; |
1613 | 1614 | ||
1614 | i_size_write(inode, i_size); | 1615 | i_size_write(inode, i_size); |
1615 | mark_inode_dirty_sync(inode); | 1616 | f2fs_mark_inode_dirty_sync(inode); |
1616 | if (clean || recover) | 1617 | if (clean || recover) |
1617 | set_inode_flag(inode, FI_AUTO_RECOVER); | 1618 | set_inode_flag(inode, FI_AUTO_RECOVER); |
1618 | } | 1619 | } |
@@ -1627,19 +1628,19 @@ static inline bool f2fs_skip_inode_update(struct inode *inode) | |||
1627 | static inline void f2fs_i_depth_write(struct inode *inode, unsigned int depth) | 1628 | static inline void f2fs_i_depth_write(struct inode *inode, unsigned int depth) |
1628 | { | 1629 | { |
1629 | F2FS_I(inode)->i_current_depth = depth; | 1630 | F2FS_I(inode)->i_current_depth = depth; |
1630 | mark_inode_dirty_sync(inode); | 1631 | f2fs_mark_inode_dirty_sync(inode); |
1631 | } | 1632 | } |
1632 | 1633 | ||
1633 | static inline void f2fs_i_xnid_write(struct inode *inode, nid_t xnid) | 1634 | static inline void f2fs_i_xnid_write(struct inode *inode, nid_t xnid) |
1634 | { | 1635 | { |
1635 | F2FS_I(inode)->i_xattr_nid = xnid; | 1636 | F2FS_I(inode)->i_xattr_nid = xnid; |
1636 | mark_inode_dirty_sync(inode); | 1637 | f2fs_mark_inode_dirty_sync(inode); |
1637 | } | 1638 | } |
1638 | 1639 | ||
1639 | static inline void f2fs_i_pino_write(struct inode *inode, nid_t pino) | 1640 | static inline void f2fs_i_pino_write(struct inode *inode, nid_t pino) |
1640 | { | 1641 | { |
1641 | F2FS_I(inode)->i_pino = pino; | 1642 | F2FS_I(inode)->i_pino = pino; |
1642 | mark_inode_dirty_sync(inode); | 1643 | f2fs_mark_inode_dirty_sync(inode); |
1643 | } | 1644 | } |
1644 | 1645 | ||
1645 | static inline void get_inline_info(struct inode *inode, struct f2fs_inode *ri) | 1646 | static inline void get_inline_info(struct inode *inode, struct f2fs_inode *ri) |
@@ -1767,13 +1768,13 @@ static inline int is_file(struct inode *inode, int type) | |||
1767 | static inline void set_file(struct inode *inode, int type) | 1768 | static inline void set_file(struct inode *inode, int type) |
1768 | { | 1769 | { |
1769 | F2FS_I(inode)->i_advise |= type; | 1770 | F2FS_I(inode)->i_advise |= type; |
1770 | mark_inode_dirty_sync(inode); | 1771 | f2fs_mark_inode_dirty_sync(inode); |
1771 | } | 1772 | } |
1772 | 1773 | ||
1773 | static inline void clear_file(struct inode *inode, int type) | 1774 | static inline void clear_file(struct inode *inode, int type) |
1774 | { | 1775 | { |
1775 | F2FS_I(inode)->i_advise &= ~type; | 1776 | F2FS_I(inode)->i_advise &= ~type; |
1776 | mark_inode_dirty_sync(inode); | 1777 | f2fs_mark_inode_dirty_sync(inode); |
1777 | } | 1778 | } |
1778 | 1779 | ||
1779 | static inline int f2fs_readonly(struct super_block *sb) | 1780 | static inline int f2fs_readonly(struct super_block *sb) |
@@ -1920,6 +1921,7 @@ static inline int f2fs_add_link(struct dentry *dentry, struct inode *inode) | |||
1920 | /* | 1921 | /* |
1921 | * super.c | 1922 | * super.c |
1922 | */ | 1923 | */ |
1924 | int f2fs_inode_dirtied(struct inode *); | ||
1923 | void f2fs_inode_synced(struct inode *); | 1925 | void f2fs_inode_synced(struct inode *); |
1924 | int f2fs_commit_super(struct f2fs_sb_info *, bool); | 1926 | int f2fs_commit_super(struct f2fs_sb_info *, bool); |
1925 | int f2fs_sync_fs(struct super_block *, int); | 1927 | int f2fs_sync_fs(struct super_block *, int); |
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 2b777a42bf43..1ec0197a3c9b 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c | |||
@@ -263,7 +263,7 @@ sync_nodes: | |||
263 | } | 263 | } |
264 | 264 | ||
265 | if (need_inode_block_update(sbi, ino)) { | 265 | if (need_inode_block_update(sbi, ino)) { |
266 | mark_inode_dirty_sync(inode); | 266 | f2fs_mark_inode_dirty_sync(inode); |
267 | f2fs_write_inode(inode, NULL); | 267 | f2fs_write_inode(inode, NULL); |
268 | goto sync_nodes; | 268 | goto sync_nodes; |
269 | } | 269 | } |
@@ -631,7 +631,7 @@ int f2fs_truncate(struct inode *inode) | |||
631 | return err; | 631 | return err; |
632 | 632 | ||
633 | inode->i_mtime = inode->i_ctime = CURRENT_TIME; | 633 | inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
634 | mark_inode_dirty_sync(inode); | 634 | f2fs_mark_inode_dirty_sync(inode); |
635 | return 0; | 635 | return 0; |
636 | } | 636 | } |
637 | 637 | ||
@@ -721,7 +721,7 @@ int f2fs_setattr(struct dentry *dentry, struct iattr *attr) | |||
721 | } | 721 | } |
722 | } | 722 | } |
723 | 723 | ||
724 | mark_inode_dirty_sync(inode); | 724 | f2fs_mark_inode_dirty_sync(inode); |
725 | return err; | 725 | return err; |
726 | } | 726 | } |
727 | 727 | ||
@@ -1276,7 +1276,7 @@ static long f2fs_fallocate(struct file *file, int mode, | |||
1276 | 1276 | ||
1277 | if (!ret) { | 1277 | if (!ret) { |
1278 | inode->i_mtime = inode->i_ctime = CURRENT_TIME; | 1278 | inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
1279 | mark_inode_dirty_sync(inode); | 1279 | f2fs_mark_inode_dirty_sync(inode); |
1280 | f2fs_update_time(F2FS_I_SB(inode), REQ_TIME); | 1280 | f2fs_update_time(F2FS_I_SB(inode), REQ_TIME); |
1281 | } | 1281 | } |
1282 | 1282 | ||
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 2cd0edcc4ebc..d411ab6c7483 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c | |||
@@ -569,7 +569,7 @@ void f2fs_delete_inline_entry(struct f2fs_dir_entry *dentry, struct page *page, | |||
569 | f2fs_put_page(page, 1); | 569 | f2fs_put_page(page, 1); |
570 | 570 | ||
571 | dir->i_ctime = dir->i_mtime = CURRENT_TIME; | 571 | dir->i_ctime = dir->i_mtime = CURRENT_TIME; |
572 | mark_inode_dirty_sync(dir); | 572 | f2fs_mark_inode_dirty_sync(dir); |
573 | 573 | ||
574 | if (inode) | 574 | if (inode) |
575 | f2fs_drop_nlink(dir, inode); | 575 | f2fs_drop_nlink(dir, inode); |
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 9221ca22720c..9ac5efc15347 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c | |||
@@ -18,6 +18,13 @@ | |||
18 | 18 | ||
19 | #include <trace/events/f2fs.h> | 19 | #include <trace/events/f2fs.h> |
20 | 20 | ||
21 | void f2fs_mark_inode_dirty_sync(struct inode *inode) | ||
22 | { | ||
23 | if (f2fs_inode_dirtied(inode)) | ||
24 | return; | ||
25 | mark_inode_dirty_sync(inode); | ||
26 | } | ||
27 | |||
21 | void f2fs_set_inode_flags(struct inode *inode) | 28 | void f2fs_set_inode_flags(struct inode *inode) |
22 | { | 29 | { |
23 | unsigned int flags = F2FS_I(inode)->i_flags; | 30 | unsigned int flags = F2FS_I(inode)->i_flags; |
@@ -35,7 +42,7 @@ void f2fs_set_inode_flags(struct inode *inode) | |||
35 | new_fl |= S_DIRSYNC; | 42 | new_fl |= S_DIRSYNC; |
36 | inode_set_flags(inode, new_fl, | 43 | inode_set_flags(inode, new_fl, |
37 | S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC); | 44 | S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC); |
38 | mark_inode_dirty_sync(inode); | 45 | f2fs_mark_inode_dirty_sync(inode); |
39 | } | 46 | } |
40 | 47 | ||
41 | static void __get_inode_rdev(struct inode *inode, struct f2fs_inode *ri) | 48 | static void __get_inode_rdev(struct inode *inode, struct f2fs_inode *ri) |
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 4460400133cf..c9ba6d7a6a06 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c | |||
@@ -757,7 +757,7 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
757 | up_write(&F2FS_I(old_inode)->i_sem); | 757 | up_write(&F2FS_I(old_inode)->i_sem); |
758 | 758 | ||
759 | old_inode->i_ctime = CURRENT_TIME; | 759 | old_inode->i_ctime = CURRENT_TIME; |
760 | mark_inode_dirty_sync(old_inode); | 760 | f2fs_mark_inode_dirty_sync(old_inode); |
761 | 761 | ||
762 | f2fs_delete_entry(old_entry, old_page, old_dir, NULL); | 762 | f2fs_delete_entry(old_entry, old_page, old_dir, NULL); |
763 | 763 | ||
@@ -909,7 +909,7 @@ static int f2fs_cross_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
909 | f2fs_i_links_write(old_dir, old_nlink > 0); | 909 | f2fs_i_links_write(old_dir, old_nlink > 0); |
910 | up_write(&F2FS_I(old_dir)->i_sem); | 910 | up_write(&F2FS_I(old_dir)->i_sem); |
911 | } | 911 | } |
912 | mark_inode_dirty_sync(old_dir); | 912 | f2fs_mark_inode_dirty_sync(old_dir); |
913 | 913 | ||
914 | /* update directory entry info of new dir inode */ | 914 | /* update directory entry info of new dir inode */ |
915 | f2fs_set_link(new_dir, new_entry, new_page, old_inode); | 915 | f2fs_set_link(new_dir, new_entry, new_page, old_inode); |
@@ -924,7 +924,7 @@ static int f2fs_cross_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
924 | f2fs_i_links_write(new_dir, new_nlink > 0); | 924 | f2fs_i_links_write(new_dir, new_nlink > 0); |
925 | up_write(&F2FS_I(new_dir)->i_sem); | 925 | up_write(&F2FS_I(new_dir)->i_sem); |
926 | } | 926 | } |
927 | mark_inode_dirty_sync(new_dir); | 927 | f2fs_mark_inode_dirty_sync(new_dir); |
928 | 928 | ||
929 | f2fs_unlock_op(sbi); | 929 | f2fs_unlock_op(sbi); |
930 | 930 | ||
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index edd1b356d667..451dfb4041e8 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c | |||
@@ -625,29 +625,14 @@ static int f2fs_drop_inode(struct inode *inode) | |||
625 | return generic_drop_inode(inode); | 625 | return generic_drop_inode(inode); |
626 | } | 626 | } |
627 | 627 | ||
628 | /* | 628 | int f2fs_inode_dirtied(struct inode *inode) |
629 | * f2fs_dirty_inode() is called from __mark_inode_dirty() | ||
630 | * | ||
631 | * We should call set_dirty_inode to write the dirty inode through write_inode. | ||
632 | */ | ||
633 | static void f2fs_dirty_inode(struct inode *inode, int flags) | ||
634 | { | 629 | { |
635 | struct f2fs_sb_info *sbi = F2FS_I_SB(inode); | 630 | struct f2fs_sb_info *sbi = F2FS_I_SB(inode); |
636 | 631 | ||
637 | if (inode->i_ino == F2FS_NODE_INO(sbi) || | ||
638 | inode->i_ino == F2FS_META_INO(sbi)) | ||
639 | return; | ||
640 | |||
641 | if (flags == I_DIRTY_TIME) | ||
642 | return; | ||
643 | |||
644 | if (is_inode_flag_set(inode, FI_AUTO_RECOVER)) | ||
645 | clear_inode_flag(inode, FI_AUTO_RECOVER); | ||
646 | |||
647 | spin_lock(&sbi->inode_lock[DIRTY_META]); | 632 | spin_lock(&sbi->inode_lock[DIRTY_META]); |
648 | if (is_inode_flag_set(inode, FI_DIRTY_INODE)) { | 633 | if (is_inode_flag_set(inode, FI_DIRTY_INODE)) { |
649 | spin_unlock(&sbi->inode_lock[DIRTY_META]); | 634 | spin_unlock(&sbi->inode_lock[DIRTY_META]); |
650 | return; | 635 | return 1; |
651 | } | 636 | } |
652 | 637 | ||
653 | set_inode_flag(inode, FI_DIRTY_INODE); | 638 | set_inode_flag(inode, FI_DIRTY_INODE); |
@@ -656,6 +641,8 @@ static void f2fs_dirty_inode(struct inode *inode, int flags) | |||
656 | inc_page_count(sbi, F2FS_DIRTY_IMETA); | 641 | inc_page_count(sbi, F2FS_DIRTY_IMETA); |
657 | stat_inc_dirty_inode(sbi, DIRTY_META); | 642 | stat_inc_dirty_inode(sbi, DIRTY_META); |
658 | spin_unlock(&sbi->inode_lock[DIRTY_META]); | 643 | spin_unlock(&sbi->inode_lock[DIRTY_META]); |
644 | |||
645 | return 0; | ||
659 | } | 646 | } |
660 | 647 | ||
661 | void f2fs_inode_synced(struct inode *inode) | 648 | void f2fs_inode_synced(struct inode *inode) |
@@ -675,6 +662,28 @@ void f2fs_inode_synced(struct inode *inode) | |||
675 | spin_unlock(&sbi->inode_lock[DIRTY_META]); | 662 | spin_unlock(&sbi->inode_lock[DIRTY_META]); |
676 | } | 663 | } |
677 | 664 | ||
665 | /* | ||
666 | * f2fs_dirty_inode() is called from __mark_inode_dirty() | ||
667 | * | ||
668 | * We should call set_dirty_inode to write the dirty inode through write_inode. | ||
669 | */ | ||
670 | static void f2fs_dirty_inode(struct inode *inode, int flags) | ||
671 | { | ||
672 | struct f2fs_sb_info *sbi = F2FS_I_SB(inode); | ||
673 | |||
674 | if (inode->i_ino == F2FS_NODE_INO(sbi) || | ||
675 | inode->i_ino == F2FS_META_INO(sbi)) | ||
676 | return; | ||
677 | |||
678 | if (flags == I_DIRTY_TIME) | ||
679 | return; | ||
680 | |||
681 | if (is_inode_flag_set(inode, FI_AUTO_RECOVER)) | ||
682 | clear_inode_flag(inode, FI_AUTO_RECOVER); | ||
683 | |||
684 | f2fs_inode_dirtied(inode); | ||
685 | } | ||
686 | |||
678 | static void f2fs_i_callback(struct rcu_head *head) | 687 | static void f2fs_i_callback(struct rcu_head *head) |
679 | { | 688 | { |
680 | struct inode *inode = container_of(head, struct inode, i_rcu); | 689 | struct inode *inode = container_of(head, struct inode, i_rcu); |
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c index 2e8cb873c31e..c8898b5148eb 100644 --- a/fs/f2fs/xattr.c +++ b/fs/f2fs/xattr.c | |||
@@ -106,7 +106,7 @@ static int f2fs_xattr_advise_set(const struct xattr_handler *handler, | |||
106 | return -EINVAL; | 106 | return -EINVAL; |
107 | 107 | ||
108 | F2FS_I(inode)->i_advise |= *(char *)value; | 108 | F2FS_I(inode)->i_advise |= *(char *)value; |
109 | mark_inode_dirty_sync(inode); | 109 | f2fs_mark_inode_dirty_sync(inode); |
110 | return 0; | 110 | return 0; |
111 | } | 111 | } |
112 | 112 | ||
@@ -547,7 +547,7 @@ static int __f2fs_setxattr(struct inode *inode, int index, | |||
547 | if (index == F2FS_XATTR_INDEX_ENCRYPTION && | 547 | if (index == F2FS_XATTR_INDEX_ENCRYPTION && |
548 | !strcmp(name, F2FS_XATTR_NAME_ENCRYPTION_CONTEXT)) | 548 | !strcmp(name, F2FS_XATTR_NAME_ENCRYPTION_CONTEXT)) |
549 | f2fs_set_encrypted_inode(inode); | 549 | f2fs_set_encrypted_inode(inode); |
550 | mark_inode_dirty_sync(inode); | 550 | f2fs_mark_inode_dirty_sync(inode); |
551 | exit: | 551 | exit: |
552 | kzfree(base_addr); | 552 | kzfree(base_addr); |
553 | return error; | 553 | return error; |