aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorLi Zhong <zhong@linux.vnet.ibm.com>2013-11-13 02:21:51 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-11-13 07:43:10 -0500
commit4ec6c2aeab8a909418ac60b782a963cb7257207f (patch)
tree9f9f780852ed4c5a5cce6c2e84cbfceb1c12fd5f /fs/dcache.c
parent4fdb793ffe262cfc0b796d3b2cd05ca3b687deb9 (diff)
fix unpaired rcu lock in prepend_path()
Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 1f24cd684c51..eacc853a2e3a 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2924,6 +2924,7 @@ static int prepend_path(const struct path *path,
2924restart_mnt: 2924restart_mnt:
2925 read_seqbegin_or_lock(&mount_lock, &m_seq); 2925 read_seqbegin_or_lock(&mount_lock, &m_seq);
2926 seq = 0; 2926 seq = 0;
2927 rcu_read_lock();
2927restart: 2928restart:
2928 bptr = *buffer; 2929 bptr = *buffer;
2929 blen = *buflen; 2930 blen = *buflen;
@@ -2971,6 +2972,9 @@ restart:
2971 goto restart; 2972 goto restart;
2972 } 2973 }
2973 done_seqretry(&rename_lock, seq); 2974 done_seqretry(&rename_lock, seq);
2975
2976 if (!(m_seq & 1))
2977 rcu_read_unlock();
2974 if (need_seqretry(&mount_lock, m_seq)) { 2978 if (need_seqretry(&mount_lock, m_seq)) {
2975 m_seq = 1; 2979 m_seq = 1;
2976 goto restart_mnt; 2980 goto restart_mnt;