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

Commit 5366dc9f authored by Michael Halcrow's avatar Michael Halcrow Committed by Linus Torvalds
Browse files

eCryptfs: Swap dput() and mntput()



ecryptfs_d_release() is doing a mntput before doing the dput.  This patch
moves the dput before the mntput.

Thanks to Rajouri Jammu for reporting this.

Signed-off-by: default avatarMichael Halcrow <mhalcrow@us.ibm.com>
Cc: Rajouri Jammu <rajouri.jammu@gmail.com>
Cc: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ae66be9b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -80,8 +80,8 @@ static void ecryptfs_d_release(struct dentry *dentry)
{
{
	if (ecryptfs_dentry_to_private(dentry)) {
	if (ecryptfs_dentry_to_private(dentry)) {
		if (ecryptfs_dentry_to_lower(dentry)) {
		if (ecryptfs_dentry_to_lower(dentry)) {
			mntput(ecryptfs_dentry_to_lower_mnt(dentry));
			dput(ecryptfs_dentry_to_lower(dentry));
			dput(ecryptfs_dentry_to_lower(dentry));
			mntput(ecryptfs_dentry_to_lower_mnt(dentry));
		}
		}
		kmem_cache_free(ecryptfs_dentry_info_cache,
		kmem_cache_free(ecryptfs_dentry_info_cache,
				ecryptfs_dentry_to_private(dentry));
				ecryptfs_dentry_to_private(dentry));