.. | .. |
---|
881 | 881 | rename->rn_tname, rename->rn_tnamelen); |
---|
882 | 882 | if (status) |
---|
883 | 883 | return status; |
---|
884 | | - set_change_info(&rename->rn_sinfo, &cstate->current_fh); |
---|
885 | | - set_change_info(&rename->rn_tinfo, &cstate->save_fh); |
---|
| 884 | + set_change_info(&rename->rn_sinfo, &cstate->save_fh); |
---|
| 885 | + set_change_info(&rename->rn_tinfo, &cstate->current_fh); |
---|
886 | 886 | return nfs_ok; |
---|
887 | 887 | } |
---|
888 | 888 | |
---|
.. | .. |
---|
1075 | 1075 | return status; |
---|
1076 | 1076 | out_put_dst: |
---|
1077 | 1077 | nfsd_file_put(*dst); |
---|
| 1078 | + *dst = NULL; |
---|
1078 | 1079 | out_put_src: |
---|
1079 | 1080 | nfsd_file_put(*src); |
---|
| 1081 | + *src = NULL; |
---|
1080 | 1082 | goto out; |
---|
1081 | 1083 | } |
---|
1082 | 1084 | |
---|
.. | .. |
---|
1246 | 1248 | return status; |
---|
1247 | 1249 | } |
---|
1248 | 1250 | |
---|
1249 | | -static void |
---|
1250 | | -nfsd4_interssc_disconnect(struct vfsmount *ss_mnt) |
---|
1251 | | -{ |
---|
1252 | | - nfs_do_sb_deactive(ss_mnt->mnt_sb); |
---|
1253 | | - mntput(ss_mnt); |
---|
1254 | | -} |
---|
1255 | | - |
---|
1256 | 1251 | /* |
---|
1257 | 1252 | * Verify COPY destination stateid. |
---|
1258 | 1253 | * |
---|
.. | .. |
---|
1320 | 1315 | static void |
---|
1321 | 1316 | nfsd4_cleanup_inter_ssc(struct vfsmount *ss_mnt, struct nfsd_file *src, |
---|
1322 | 1317 | struct nfsd_file *dst) |
---|
1323 | | -{ |
---|
1324 | | -} |
---|
1325 | | - |
---|
1326 | | -static void |
---|
1327 | | -nfsd4_interssc_disconnect(struct vfsmount *ss_mnt) |
---|
1328 | 1318 | { |
---|
1329 | 1319 | } |
---|
1330 | 1320 | |
---|
.. | .. |
---|
1469 | 1459 | copy->nf_src = kzalloc(sizeof(struct nfsd_file), GFP_KERNEL); |
---|
1470 | 1460 | if (!copy->nf_src) { |
---|
1471 | 1461 | copy->nfserr = nfserr_serverfault; |
---|
1472 | | - nfsd4_interssc_disconnect(copy->ss_mnt); |
---|
| 1462 | + /* ss_mnt will be unmounted by the laundromat */ |
---|
1473 | 1463 | goto do_callback; |
---|
1474 | 1464 | } |
---|
1475 | 1465 | copy->nf_src->nf_file = nfs42_ssc_open(copy->ss_mnt, ©->c_fh, |
---|
1476 | 1466 | ©->stateid); |
---|
1477 | 1467 | if (IS_ERR(copy->nf_src->nf_file)) { |
---|
1478 | 1468 | copy->nfserr = nfserr_offload_denied; |
---|
1479 | | - nfsd4_interssc_disconnect(copy->ss_mnt); |
---|
| 1469 | + /* ss_mnt will be unmounted by the laundromat */ |
---|
1480 | 1470 | goto do_callback; |
---|
1481 | 1471 | } |
---|
1482 | 1472 | } |
---|
.. | .. |
---|
1559 | 1549 | if (async_copy) |
---|
1560 | 1550 | cleanup_async_copy(async_copy); |
---|
1561 | 1551 | status = nfserrno(-ENOMEM); |
---|
1562 | | - if (!copy->cp_intra) |
---|
1563 | | - nfsd4_interssc_disconnect(copy->ss_mnt); |
---|
| 1552 | + /* |
---|
| 1553 | + * source's vfsmount of inter-copy will be unmounted |
---|
| 1554 | + * by the laundromat |
---|
| 1555 | + */ |
---|
1564 | 1556 | goto out; |
---|
1565 | 1557 | } |
---|
1566 | 1558 | |
---|