aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4proc.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 5dee81141ab7..8ae5abfe6ba2 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -813,21 +813,11 @@ nfsd4_rename(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
813 status = nfsd_rename(rqstp, &cstate->save_fh, rename->rn_sname, 813 status = nfsd_rename(rqstp, &cstate->save_fh, rename->rn_sname,
814 rename->rn_snamelen, &cstate->current_fh, 814 rename->rn_snamelen, &cstate->current_fh,
815 rename->rn_tname, rename->rn_tnamelen); 815 rename->rn_tname, rename->rn_tnamelen);
816 816 if (status)
817 /* the underlying filesystem returns different error's than required 817 return status;
818 * by NFSv4. both save_fh and current_fh have been verified.. */ 818 set_change_info(&rename->rn_sinfo, &cstate->current_fh);
819 if (status == nfserr_isdir) 819 set_change_info(&rename->rn_tinfo, &cstate->save_fh);
820 status = nfserr_exist; 820 return nfs_ok;
821 else if ((status == nfserr_notdir) &&
822 (S_ISDIR(cstate->save_fh.fh_dentry->d_inode->i_mode) &&
823 S_ISDIR(cstate->current_fh.fh_dentry->d_inode->i_mode)))
824 status = nfserr_exist;
825
826 if (!status) {
827 set_change_info(&rename->rn_sinfo, &cstate->current_fh);
828 set_change_info(&rename->rn_tinfo, &cstate->save_fh);
829 }
830 return status;
831} 821}
832 822
833static __be32 823static __be32