Replace NFS4ERR_NOTEMPY with NFS4ERR_EXIST
Subsystems (2)
PATCH 1/1 Replace NFS4ERR_NOTEMPY with NFS4ERR_EXIST
Fix a test in rename operation. rename dir1 into existing,nonempty dir2 should return NFS4ERR_EXIST instead got NFS4ERR_NOTEMPTY. RFC says if the target is a directory but not empty, the server will return the error, NFS4ERR_EXIST.
--- fs/nfsd/nfs4proc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nfsd/nfs4proc.c +0 -0
@@ -605,7 +605,7 @@ nfsd4_rename(struct svc_rqst *rqstp, struct
nfsd4_compound_state *cstate,
/* the underlying filesystem returns different error's than required
* by NFSv4. both save_fh and current_fh have been verified.. */
- if (status == nfserr_isdir)
+ if (status == nfserr_isdir || status == nfserr_notempty)
status = nfserr_exist;
else if ((status == nfserr_notdir) &&
(S_ISDIR(cstate->save_fh.fh_dentry->d_inode->i_mode) &&
Ni Wenjuan =D0=B4=B5=C0:
Quoted 1 line
Fix a test in rename operation. rename dir1 into existing,nonempty di=
r2 should
Quoted 1 line
return
NFS4ERR_EXISTinstead gotNFS4ERR_NOTEMPTY. RFC says if the t=
arget is a
Quoted 1 line
directory but not empty, the server will return the error, NFS4ERR_EX=
IST.
Quoted 13 lines
=20
Signed-off-by Ni Wenjuan <[email protected]>=20
--- fs/nfsd/nfs4proc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)=20
fs/nfsd/nfs4proc.c +0
-0@@ -605,7 +605,7 @@ nfsd4_rename(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
Quoted 2 lines
=20
/* the underlying filesystem returns different error's than require=
d
fs/nfsd/nfs4proc.c
Quoted 6 lines
fs/nfsd/nfs4proc.c +1
-1* by NFSv4. both save_fh and current_fh have been verified.. */ - if (status =3D=3D nfserr_isdir) + if (status =3D=3D nfserr_isdir || status =3D=3D nfserr_notempty) status =3D nfserr_exist; else if ((status =3D=3D nfserr_notdir) && (S_ISDIR(cstate->save_fh.fh_dentry->d_inode->i_mod=
e) &&
Bruce ,do you think this patch is ok ? Can it be accepted?
Quoted 2 lines · Ni Wenjuan
Ni Wenjuan =E5=86=99=E9=81=93:
Quoted 1 line
Fix a test in rename operation. rename dir1 into existing,nonempty =
dir2 should
Quoted 1 line
Quoted 1 line
return
NFS4ERR_EXISTinstead gotNFS4ERR_NOTEMPTY. RFC says if the=
target is a
Quoted 1 line
Quoted 1 line
directory but not empty, the server will return the error, NFS4ERR_=
EXIST.
Quoted 7 lines
Quoted 7 lines
=20
Signed-off-by Ni Wenjuan <[email protected]>=20
--- fs/nfsd/nfs4proc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)=20
Quoted 8 lines
Quoted 8 lines
fs/nfsd/nfs4proc.c +0
-0@@ -605,7 +605,7 @@ nfsd4_rename(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,=20
/* the underlying filesystem returns different error's than requi=
red
Quoted 6 lines
fs/nfsd/nfs4proc.c
Quoted 6 lines
fs/nfsd/nfs4proc.c +1
-1* by NFSv4. both save_fh and current_fh have been verified.. */ - if (status =3D=3D nfserr_isdir) + if (status =3D=3D nfserr_isdir || status =3D=3D nfserr_notempty) status =3D nfserr_exist; else if ((status =3D=3D nfserr_notdir) && (S_ISDIR(cstate->save_fh.fh_dentry->d_inode->i_m=
ode) &&
Quoted 2 lines
=20
Bruce ,do you think this patch is ok ? Can it be accepted?
OK. Did you already post this patch? Sorry, I can't seem to find it. Could you repost in the standard format?
--b.