FS-Cache: Don't override netfs's primary_index if registering failed
authorKinglong Mee <kinglongmee@gmail.com>
Wed, 4 Nov 2015 15:20:24 +0000 (15:20 +0000)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 11 Nov 2015 07:07:51 +0000 (02:07 -0500)
commitb130ed5998e62879a66bad08931a2b5e832da95c
tree199f61e2d9822d5bbde3ba1bbda2a54bead3628c
parent86108c2e34a26e4bec3c6ddb23390bf8cedcf391
FS-Cache: Don't override netfs's primary_index if registering failed

Only override netfs->primary_index when registering success.

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