]> git.baikalelectronics.ru Git - kernel.git/commit
FS-Cache: Increase reference of parent after registering, netfs success
authorKinglong Mee <kinglongmee@gmail.com>
Wed, 4 Nov 2015 15:20:15 +0000 (15:20 +0000)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 11 Nov 2015 07:06:53 +0000 (02:06 -0500)
commit90f11c415b5e291d8ea886b50268b94695673c7c
tree6c9dc0e43e804fa041a2e0d5c20e70678d3f898d
parent00f5c0aa56392bf74e2f58ea5ed85facd7f8c7e6
FS-Cache: Increase reference of parent after registering, netfs success

If netfs exist, fscache should not increase the reference of parent's
usage and n_children, otherwise, never be decreased.

v2: thanks David's suggest,
 move increasing reference of parent if success
 use kmem_cache_free() freeing primary_index directly

v3: don't move "netfs->primary_index->parent = &fscache_fsdef_index;"

Cc: stable@vger.kernel.org # v2.6.30+
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/fscache/netfs.c