Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8c2ee3c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "f2fs: fix to drop meta/node pages during umount"

parents 834619a5 1f9a28ce
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -873,7 +873,21 @@ static struct inode *f2fs_alloc_inode(struct super_block *sb)

static int f2fs_drop_inode(struct inode *inode)
{
	struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
	int ret;

	/*
	 * during filesystem shutdown, if checkpoint is disabled,
	 * drop useless meta/node dirty pages.
	 */
	if (unlikely(is_sbi_flag_set(sbi, SBI_CP_DISABLED))) {
		if (inode->i_ino == F2FS_NODE_INO(sbi) ||
			inode->i_ino == F2FS_META_INO(sbi)) {
			trace_f2fs_drop_inode(inode, 1);
			return 1;
		}
	}

	/*
	 * This is to avoid a deadlock condition like below.
	 * writeback_single_inode(inode)