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

Commit a3cfbb53 authored by Li Zefan's avatar Li Zefan Committed by Linus Torvalds
Browse files

vfs: add missing unlock in sget()



In sget(), destroy_super(s) is called with s->s_umount held, which makes
lockdep unhappy.

Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Menage <menage@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e5bc49ba
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -371,8 +371,10 @@ struct super_block *sget(struct file_system_type *type,
				continue;
			if (!grab_super(old))
				goto retry;
			if (s)
			if (s) {
				up_write(&s->s_umount);
				destroy_super(s);
			}
			return old;
		}
	}
@@ -387,6 +389,7 @@ struct super_block *sget(struct file_system_type *type,
	err = set(s, data);
	if (err) {
		spin_unlock(&sb_lock);
		up_write(&s->s_umount);
		destroy_super(s);
		return ERR_PTR(err);
	}