Linux/linux 9091051fs/nfs nfs4proc.c

NFS4: Only set creation opendata if O_CREAT

We can end up in nfs4_opendata_alloc during task exit, in which case
current->fs has already been cleaned up.  This leads to a crash in
current_umask().

Fix this by only setting creation opendata if we are actually doing an open
with O_CREAT.  We can drop the check for NULL nfs4_open_createattrs, since
O_CREAT will never be set for the recovery path.

Suggested-by: Trond Myklebust <trondmy at hammerspace.com>
Signed-off-by: Benjamin Coddington <bcodding at redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker at Netapp.com>
DeltaFile
+11-9fs/nfs/nfs4proc.c
+11-91 files

UnifiedSplitRaw