diff options
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r-- | fs/nfsd/nfs4proc.c | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 38b0f91175d0..8333db12caca 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c | |||
@@ -802,13 +802,29 @@ nfsd4_proc_compound(struct svc_rqst *rqstp, | |||
802 | * SETCLIENTID_CONFIRM, PUTFH and PUTROOTFH | 802 | * SETCLIENTID_CONFIRM, PUTFH and PUTROOTFH |
803 | * require a valid current filehandle | 803 | * require a valid current filehandle |
804 | */ | 804 | */ |
805 | if ((!current_fh->fh_dentry) && | 805 | if (!current_fh->fh_dentry) { |
806 | !((op->opnum == OP_PUTFH) || (op->opnum == OP_PUTROOTFH) || | 806 | if (!((op->opnum == OP_PUTFH) || |
807 | (op->opnum == OP_SETCLIENTID) || | 807 | (op->opnum == OP_PUTROOTFH) || |
808 | (op->opnum == OP_SETCLIENTID_CONFIRM) || | 808 | (op->opnum == OP_SETCLIENTID) || |
809 | (op->opnum == OP_RENEW) || (op->opnum == OP_RESTOREFH) || | 809 | (op->opnum == OP_SETCLIENTID_CONFIRM) || |
810 | (op->opnum == OP_RELEASE_LOCKOWNER))) { | 810 | (op->opnum == OP_RENEW) || |
811 | op->status = nfserr_nofilehandle; | 811 | (op->opnum == OP_RESTOREFH) || |
812 | (op->opnum == OP_RELEASE_LOCKOWNER))) { | ||
813 | op->status = nfserr_nofilehandle; | ||
814 | goto encode_op; | ||
815 | } | ||
816 | } | ||
817 | /* Check must be done at start of each operation, except | ||
818 | * for GETATTR and ops not listed as returning NFS4ERR_MOVED | ||
819 | */ | ||
820 | else if (current_fh->fh_export->ex_fslocs.migrated && | ||
821 | !((op->opnum == OP_GETATTR) || | ||
822 | (op->opnum == OP_PUTROOTFH) || | ||
823 | (op->opnum == OP_PUTPUBFH) || | ||
824 | (op->opnum == OP_RENEW) || | ||
825 | (op->opnum == OP_SETCLIENTID) || | ||
826 | (op->opnum == OP_RELEASE_LOCKOWNER))) { | ||
827 | op->status = nfserr_moved; | ||
812 | goto encode_op; | 828 | goto encode_op; |
813 | } | 829 | } |
814 | switch (op->opnum) { | 830 | switch (op->opnum) { |