]>
Commit | Line | Data |
---|---|---|
9515b5a6 GKH |
1 | From 21496687a79424572f46a84c690d331055f4866f Mon Sep 17 00:00:00 2001 |
2 | From: Pavel Shilovsky <pshilovsky@samba.org> | |
3 | Date: Fri, 18 Jul 2014 18:25:52 +0400 | |
4 | Subject: CIFS: Fix STATUS_CANNOT_DELETE error mapping for SMB2 | |
5 | ||
6 | From: Pavel Shilovsky <pshilovsky@samba.org> | |
7 | ||
8 | commit 21496687a79424572f46a84c690d331055f4866f upstream. | |
9 | ||
10 | The existing mapping causes unlink() call to return error after delete | |
11 | operation. Changing the mapping to -EACCES makes the client process | |
12 | the call like CIFS protocol does - reset dos attributes with ATTR_READONLY | |
13 | flag masked off and retry the operation. | |
14 | ||
15 | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> | |
16 | Signed-off-by: Steve French <smfrench@gmail.com> | |
17 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
18 | ||
19 | --- | |
20 | fs/cifs/smb2maperror.c | 2 +- | |
21 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
22 | ||
23 | --- a/fs/cifs/smb2maperror.c | |
24 | +++ b/fs/cifs/smb2maperror.c | |
25 | @@ -605,7 +605,7 @@ static const struct status_to_posix_erro | |
26 | {STATUS_MAPPED_FILE_SIZE_ZERO, -EIO, "STATUS_MAPPED_FILE_SIZE_ZERO"}, | |
27 | {STATUS_TOO_MANY_OPENED_FILES, -EMFILE, "STATUS_TOO_MANY_OPENED_FILES"}, | |
28 | {STATUS_CANCELLED, -EIO, "STATUS_CANCELLED"}, | |
29 | - {STATUS_CANNOT_DELETE, -EIO, "STATUS_CANNOT_DELETE"}, | |
30 | + {STATUS_CANNOT_DELETE, -EACCES, "STATUS_CANNOT_DELETE"}, | |
31 | {STATUS_INVALID_COMPUTER_NAME, -EIO, "STATUS_INVALID_COMPUTER_NAME"}, | |
32 | {STATUS_FILE_DELETED, -EIO, "STATUS_FILE_DELETED"}, | |
33 | {STATUS_SPECIAL_ACCOUNT, -EIO, "STATUS_SPECIAL_ACCOUNT"}, |