Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117582
b: refs/heads/master
c: dd1db2d
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Layton authored and Steve French committed Oct 17, 2008
1 parent 918717c commit 3eba040
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 469ee614aaa367d9cde01cbdd2027212f56c6cc6
refs/heads/master: dd1db2dedc4f6ad736fbba5aa6ecfe6e7c8ee0f4
15 changes: 10 additions & 5 deletions trunk/fs/cifs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,7 @@ cifs_rename_pending_delete(char *full_path, struct inode *inode, int xid)
FILE_BASIC_INFO *info_buf;

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);
if (rc != 0)
Expand All @@ -810,17 +809,23 @@ cifs_rename_pending_delete(char *full_path, struct inode *inode, int xid)
goto out_close;
cifsInode->cifsAttrs = dosattr;

/* silly-rename the file */
CIFSSMBRenameOpenFile(xid, tcon, netfid, NULL, cifs_sb->local_nls,
/* rename the file */
rc = CIFSSMBRenameOpenFile(xid, tcon, netfid, NULL, cifs_sb->local_nls,
cifs_sb->mnt_cifs_flags &
CIFS_MOUNT_MAP_SPECIAL_CHR);
if (rc != 0)
goto out;

/* set DELETE_ON_CLOSE */
rc = CIFSSMBSetFileDisposition(xid, tcon, true, netfid, current->tgid);

/*
* some samba versions return -ENOENT when we try to set the file
* disposition here. Likely a samba bug, but work around it for now
* disposition here. Likely a samba bug, but work around it for now.
* This means that some cifsXXX files may hang around after they
* shouldn't.
*
* BB: remove this once fixed samba servers are in the field
*/
if (rc == -ENOENT)
rc = 0;
Expand Down

0 comments on commit 3eba040

Please sign in to comment.