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

Commit ccd3d905 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull vfs fixes from Al Viro:
 "A couple of fixes; a leak in mntns_install() caught by Andrei (this
  cycle regression) + d_invalidate() softlockup fix - that had been
  reported by a bunch of people lately, but the problem is pretty old"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  fs: don't forget to put old mntns in mntns_install
  Hang/soft lockup in d_invalidate with simultaneous calls
parents 1439ccf7 4068367c
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -1494,7 +1494,7 @@ static void check_and_drop(void *_data)
{
	struct detach_data *data = _data;

	if (!data->mountpoint && !data->select.found)
	if (!data->mountpoint && list_empty(&data->select.dispose))
		__d_drop(data->select.start);
}

@@ -1536,17 +1536,15 @@ void d_invalidate(struct dentry *dentry)

		d_walk(dentry, &data, detach_and_collect, check_and_drop);

		if (data.select.found)
		if (!list_empty(&data.select.dispose))
			shrink_dentry_list(&data.select.dispose);
		else if (!data.mountpoint)
			return;

		if (data.mountpoint) {
			detach_mounts(data.mountpoint);
			dput(data.mountpoint);
		}

		if (!data.mountpoint && !data.select.found)
			break;

		cond_resched();
	}
}
+2 −0
Original line number Diff line number Diff line
@@ -3488,6 +3488,8 @@ static int mntns_install(struct nsproxy *nsproxy, struct ns_common *ns)
		return err;
	}

	put_mnt_ns(old_mnt_ns);

	/* Update the pwd and root */
	set_fs_pwd(fs, &root);
	set_fs_root(fs, &root);