[linux-cifs-client] Re: [PATCH] cifs: fix busy-file renames and refactor cifs_rename ...

Steve French smfrench at gmail.com
Mon Sep 22 23:50:39 GMT 2008


A few comments about patch
http://git.samba.org/?p=jlayton/cifs.git;a=commitdiff;h=3a611c1fed0879ba3b672e221b4a8fcb20d52ef2

1) The check for from_dentry->d_parent != to_dentry->d_parent in
cifs_do_rename seems unnecessary since it is not required that a
server reject a rename by handle outside of the current directory
although some MS servers do reject this.

2) In cifs_do_rename, my preference would be to remove the goto and
corresponding label (by reversing the if to "if (rc==0)
CIFSSMBRenameOpenFile ,,,").  In general I prefer only using gotos
when it simplifies the code

3) by reordering the FreeXid statement at the beginning of cifs_rename
you lose the logging of the function return code on a common case
(EXDEV) when the debug flags are turned on in /proc/fs/cifs/

-       if (pTcon != cifs_sb_target->tcon) {
-               FreeXid(xid);
-               return -EXDEV;
-- 
Thanks,

Steve


More information about the linux-cifs-client mailing list