fs/nfs: don't try to set nfs error code from mount rpc call
A packet from a mount rpc call doesn't have an NFS error field, so don't
try to access this.

In the case of the MOUNT_UMOUNT procedure the reply package is short
such that accessing the u32 after the rpc_reply structure is already
after the end of the packet. Apart from the access to out-of-packet data
there is no harm because the wrongly read value is unused. But make this
more explicit by only using nfserr if the call was an NFS request.

Fixes: 9ede56ad2476 ("fs: Add NFS support")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 25082ef commit 9d929c6f4b5ed7d9b7be7ef874c8523a52719c81
@Uwe Kleine-König Uwe Kleine-König authored on 21 Jan 2019
Sascha Hauer committed on 22 Jan 2019
Showing 1 changed file
View
fs/nfs.c