Files
linux/fs
J. Bruce Fields b4fee5b24c nfsd4: fix leak of inode reference on delegation failure
commit bf7bd3e98b upstream.

This fixes a regression from 68a3396178
"nfsd4: shut down more of delegation earlier".

After that commit, nfs4_set_delegation() failures result in
nfs4_put_delegation being called, but nfs4_put_delegation doesn't free
the nfs4_file that has already been set by alloc_init_deleg().

This can result in an oops on later unmounting the exported filesystem.

Note also delaying the fi_had_conflict check we're able to return a
better error (hence give 4.1 clients a better idea why the delegation
failed; though note CONFLICT isn't an exact match here, as that's
supposed to indicate a current conflict, but all we know here is that
there was one recently).

Reported-by: Toralf Förster <toralf.foerster@gmx.de>
Tested-by: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
[tuomasjjrasanen: backported to 3.10
   Conflicts fs/nfsd/nfs4state.c:
     Delegation type flags have been removed from upstream code. In 3.10-series,
     they still exists and therefore the commit caused few conflicts in function
     signatures.
]
Signed-off-by: Tuomas Räsänen <tuomasjjrasanen@opinsys.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-06 15:05:49 -08:00
..
2013-05-07 20:16:25 -07:00
2013-05-07 20:16:25 -07:00
2014-07-28 08:00:02 -07:00
2013-05-24 16:22:51 -07:00
2013-07-13 11:42:26 -07:00
2013-04-29 15:41:42 -04:00
2014-11-14 08:47:55 -08:00
2013-11-13 12:05:31 +09:00
2014-10-05 14:54:14 -07:00
2013-05-07 20:16:25 -07:00
2013-04-29 15:40:23 -04:00
2013-10-05 07:13:09 -07:00
2013-05-07 20:16:25 -07:00
2014-09-17 09:04:02 -07:00
2013-04-17 13:25:09 +01:00
2014-09-17 09:04:02 -07:00
2013-05-31 15:16:33 -04:00
2014-02-13 13:47:59 -08:00