Unverified Commit a81d020c authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!13138 fs: call fsnotify_sb_delete after evict_inodes

parents d047cc72 2bdc6578
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -70,6 +70,9 @@ void fsnotify_unmount_inodes(struct super_block *sb)
		 * doing an __iget/iput with SB_ACTIVE clear would actually
		 * evict all inodes with zero i_count from icache which is
		 * unnecessarily violent and may in fact be illegal to do.
		 * However, we should have been called /after/ evict_inodes
		 * removed all zero refcount inodes, in any case.  Test to
		 * be sure.
		 */
		if (!atomic_read(&inode->i_count)) {
			spin_unlock(&inode->i_lock);
+3 −1
Original line number Diff line number Diff line
@@ -442,10 +442,12 @@ void generic_shutdown_super(struct super_block *sb)
		sync_filesystem(sb);
		sb->s_flags &= ~SB_ACTIVE;

		fsnotify_unmount_inodes(sb);
		cgroup_writeback_umount();

		/* evict all inodes with zero refcount */
		evict_inodes(sb);
		/* only nonzero refcount inodes can have marks */
		fsnotify_unmount_inodes(sb);

		if (sb->s_dio_done_wq) {
			destroy_workqueue(sb->s_dio_done_wq);