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)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 27 Nov 2015 12:48:24 +0000 (12:48 +0000)
commit8f2746bba547a5dc23edf74b6006a0a593dfc08f
tree443a0a0e8750342abb58b4d4ed40684530171abe
parentbdb28a40d4d09250d442c03ffe1dfe6e88126c0a
FS-Cache: Don't override netfs's primary_index if registering failed

commit b130ed5998e62879a66bad08931a2b5e832da95c upstream.

Only override netfs->primary_index when registering success.

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>
[bwh: Backported to 3.2: no n_active or flags fields in fscache_cookie]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/fscache/netfs.c