diff options
| -rw-r--r-- | fs/cifs/inode.c | 10 | ||||
| -rw-r--r-- | fs/cifs/netmisc.c | 2 |
2 files changed, 5 insertions, 7 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 0079696305c9..20887bf63121 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
| @@ -1043,7 +1043,7 @@ cifs_rename_pending_delete(const char *full_path, struct dentry *dentry, | |||
| 1043 | cifs_sb->mnt_cifs_flags & | 1043 | cifs_sb->mnt_cifs_flags & |
| 1044 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 1044 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
| 1045 | if (rc != 0) { | 1045 | if (rc != 0) { |
| 1046 | rc = -ETXTBSY; | 1046 | rc = -EBUSY; |
| 1047 | goto undo_setattr; | 1047 | goto undo_setattr; |
| 1048 | } | 1048 | } |
| 1049 | 1049 | ||
| @@ -1062,7 +1062,7 @@ cifs_rename_pending_delete(const char *full_path, struct dentry *dentry, | |||
| 1062 | if (rc == -ENOENT) | 1062 | if (rc == -ENOENT) |
| 1063 | rc = 0; | 1063 | rc = 0; |
| 1064 | else if (rc != 0) { | 1064 | else if (rc != 0) { |
| 1065 | rc = -ETXTBSY; | 1065 | rc = -EBUSY; |
| 1066 | goto undo_rename; | 1066 | goto undo_rename; |
| 1067 | } | 1067 | } |
| 1068 | cifsInode->delete_pending = true; | 1068 | cifsInode->delete_pending = true; |
| @@ -1169,15 +1169,13 @@ psx_del_no_retry: | |||
| 1169 | cifs_drop_nlink(inode); | 1169 | cifs_drop_nlink(inode); |
| 1170 | } else if (rc == -ENOENT) { | 1170 | } else if (rc == -ENOENT) { |
| 1171 | d_drop(dentry); | 1171 | d_drop(dentry); |
| 1172 | } else if (rc == -ETXTBSY) { | 1172 | } else if (rc == -EBUSY) { |
| 1173 | if (server->ops->rename_pending_delete) { | 1173 | if (server->ops->rename_pending_delete) { |
| 1174 | rc = server->ops->rename_pending_delete(full_path, | 1174 | rc = server->ops->rename_pending_delete(full_path, |
| 1175 | dentry, xid); | 1175 | dentry, xid); |
| 1176 | if (rc == 0) | 1176 | if (rc == 0) |
| 1177 | cifs_drop_nlink(inode); | 1177 | cifs_drop_nlink(inode); |
| 1178 | } | 1178 | } |
| 1179 | if (rc == -ETXTBSY) | ||
| 1180 | rc = -EBUSY; | ||
| 1181 | } else if ((rc == -EACCES) && (dosattr == 0) && inode) { | 1179 | } else if ((rc == -EACCES) && (dosattr == 0) && inode) { |
| 1182 | attrs = kzalloc(sizeof(*attrs), GFP_KERNEL); | 1180 | attrs = kzalloc(sizeof(*attrs), GFP_KERNEL); |
| 1183 | if (attrs == NULL) { | 1181 | if (attrs == NULL) { |
| @@ -1518,7 +1516,7 @@ cifs_do_rename(const unsigned int xid, struct dentry *from_dentry, | |||
| 1518 | * source. Note that cross directory moves do not work with | 1516 | * source. Note that cross directory moves do not work with |
| 1519 | * rename by filehandle to various Windows servers. | 1517 | * rename by filehandle to various Windows servers. |
| 1520 | */ | 1518 | */ |
| 1521 | if (rc == 0 || rc != -ETXTBSY) | 1519 | if (rc == 0 || rc != -EBUSY) |
| 1522 | goto do_rename_exit; | 1520 | goto do_rename_exit; |
| 1523 | 1521 | ||
| 1524 | /* open-file renames don't work across directories */ | 1522 | /* open-file renames don't work across directories */ |
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c index a82bc51fdc82..c0b25b28be6c 100644 --- a/fs/cifs/netmisc.c +++ b/fs/cifs/netmisc.c | |||
| @@ -62,7 +62,7 @@ static const struct smb_to_posix_error mapping_table_ERRDOS[] = { | |||
| 62 | {ERRdiffdevice, -EXDEV}, | 62 | {ERRdiffdevice, -EXDEV}, |
| 63 | {ERRnofiles, -ENOENT}, | 63 | {ERRnofiles, -ENOENT}, |
| 64 | {ERRwriteprot, -EROFS}, | 64 | {ERRwriteprot, -EROFS}, |
| 65 | {ERRbadshare, -ETXTBSY}, | 65 | {ERRbadshare, -EBUSY}, |
| 66 | {ERRlock, -EACCES}, | 66 | {ERRlock, -EACCES}, |
| 67 | {ERRunsup, -EINVAL}, | 67 | {ERRunsup, -EINVAL}, |
| 68 | {ERRnosuchshare, -ENXIO}, | 68 | {ERRnosuchshare, -ENXIO}, |
