cifs: make cifs_rename handle -EACCES errors
authorJeff Layton <jlayton@redhat.com>
Mon, 20 Oct 2008 18:45:22 +0000 (14:45 -0400)
committerSteve French <sfrench@us.ibm.com>
Mon, 20 Oct 2008 18:44:13 +0000 (18:44 +0000)
cifs: make cifs_rename handle -EACCES errors

Some servers seem to return -EACCES when attempting to rename one
open file on top of another. Refactor the cifs_rename logic to
attempt to rename the target file out of the way in this situation.

This also fixes the "unlink_target" logic to be undoable if the
subsequent rename fails.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>

No differences found