[linux-cifs-client] SetFileDisposition before or after rename

Steve French smfrench at gmail.com
Tue Sep 23 17:36:41 GMT 2008


In http://git.samba.org/?p=jlayton/cifs.git;a=commitdiff;h=6bd5977a4df58b233512b52242d33c3540a3d8f9
you do the SetFileDisposition after the rename - if the
setfiledisposition failed do we even want to do the rename at all?

Is it worth changing this line:

        rc = CIFSSMBOpen(xid, tcon, full_path, FILE_OPEN,
-                        DELETE|FILE_WRITE_ATTRIBUTES,
-                        CREATE_NOT_DIR|CREATE_DELETE_ON_CLOSE,
+                        DELETE|FILE_WRITE_ATTRIBUTES, CREATE_NOT_DIR,
                         &netfid, &oplock, NULL, cifs_sb->local_nls,
                         cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);

We still don't know if setting DELETE_ON_CLOSE on open works in some
cases (and it can't hurt).

-- 
Thanks,

Steve


More information about the linux-cifs-client mailing list