]> git.itanic.dy.fi Git - linux-stable/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)
committerJiri Slaby <jslaby@suse.cz>
Wed, 24 Feb 2016 08:45:13 +0000 (09:45 +0100)
commit695c19b03c9362ceb191bbe15274ccaabeee6606
treeb04e211c0d647f189507ead2d0c799d1236d4365
parent8cc3c33db6a61e2258d4135ac13caf631e32e974
FS-Cache: Increase reference of parent after registering, netfs success

commit 86108c2e34a26e4bec3c6ddb23390bf8cedcf391 upstream.

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;"

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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
fs/fscache/netfs.c