1// SPDX-License-Identifier: GPL-2.0 2/* 3 * fs/f2fs/checkpoint.c 4 * 5 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 6 * http://www.samsung.com/ 7 */ 8#include <linux/fs.h> --- 639 unchanged lines hidden (view full) --- 648 /* 649 * there should be a bug that we can't find the entry 650 * to orphan inode. 651 */ 652 f2fs_bug_on(sbi, PTR_ERR(inode) == -ENOENT); 653 return PTR_ERR(inode); 654 } 655 |
656 err = f2fs_dquot_initialize(inode); |
657 if (err) { 658 iput(inode); 659 goto err_out; 660 } 661 662 clear_nlink(inode); 663 664 /* truncate all the data during iput */ --- 35 unchanged lines hidden (view full) --- 700 } 701 702 if (s_flags & SB_RDONLY) { 703 f2fs_info(sbi, "orphan cleanup on readonly fs"); 704 sbi->sb->s_flags &= ~SB_RDONLY; 705 } 706 707#ifdef CONFIG_QUOTA |
708 /* 709 * Turn on quotas which were not enabled for read-only mounts if 710 * filesystem has quota feature, so that they are updated correctly. 711 */ 712 quota_enabled = f2fs_enable_quota_files(sbi, s_flags & SB_RDONLY); 713#endif 714 715 start_blk = __start_cp_addr(sbi) + 1 + __cp_payload(sbi); --- 438 unchanged lines hidden (view full) --- 1154 1155static bool __need_flush_quota(struct f2fs_sb_info *sbi) 1156{ 1157 bool ret = false; 1158 1159 if (!is_journalled_quota(sbi)) 1160 return false; 1161 |
1162 if (!down_write_trylock(&sbi->quota_sem)) 1163 return true; |
1164 if (is_sbi_flag_set(sbi, SBI_QUOTA_SKIP_FLUSH)) { 1165 ret = false; 1166 } else if (is_sbi_flag_set(sbi, SBI_QUOTA_NEED_REPAIR)) { 1167 ret = false; 1168 } else if (is_sbi_flag_set(sbi, SBI_QUOTA_NEED_FLUSH)) { 1169 clear_sbi_flag(sbi, SBI_QUOTA_NEED_FLUSH); 1170 ret = true; 1171 } else if (get_pages(sbi, F2FS_DIRTY_QDATA)) { --- 741 unchanged lines hidden --- |