[CIFS] clean up error handling in cifs_unlink
authorSteve French <sfrench@us.ibm.com>
Tue, 7 Oct 2008 18:42:52 +0000 (18:42 +0000)
committerSteve French <sfrench@us.ibm.com>
Tue, 7 Oct 2008 18:42:52 +0000 (18:42 +0000)
commit6050247d8089037d6d8ea0f3c62fe4a931c1ab14
tree0be9729efe33be16bb12ccb289ec5992c450fcd9
parent6b37faa175311128dc920aaa57a5f7fab85537d7
[CIFS]  clean up error handling in cifs_unlink

Currently, if a standard delete fails and we end up getting -EACCES
we try to clear ATTR_READONLY and try the delete again. If that
then fails with -ETXTBSY then we try a rename_pending_delete. We
aren't handling other errors appropriately though.

Another client could have deleted the file in the meantime and
we get back -ENOENT, for instance. In that case we wouldn't do a
d_drop. Instead of retrying in a separate call, simply goto the
original call and use the error handling from that.

Also, we weren't properly undoing any attribute changes that
were done before returning an error back to the caller.

CC: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/inode.c