Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111151
b: refs/heads/master
c: 7ce86d5
h: refs/heads/master
i:
  111149: c72e962
  111147: 26f20c8
  111143: 856350f
  111135: e317c02
v: v3
  • Loading branch information
Jeff Layton authored and Steve French committed Sep 24, 2008
1 parent 34a38f0 commit d17d937
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 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: 74553b1b6a8556e08757b4bce537fd8332b93898
refs/heads/master: 7ce86d5a93ffe2542e6558a97ab055377df8cde3
12 changes: 10 additions & 2 deletions trunk/fs/cifs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,8 @@ 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,
DELETE|FILE_WRITE_ATTRIBUTES,
CREATE_NOT_DIR|CREATE_DELETE_ON_CLOSE,
&netfid, &oplock, NULL, cifs_sb->local_nls,
cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
if (rc != 0)
Expand All @@ -803,13 +804,20 @@ cifs_rename_pending_delete(char *full_path, struct inode *inode, int xid)
goto out_close;

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

/* 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
*/
if (rc == -ENOENT)
rc = 0;

out_close:
CIFSSMBClose(xid, tcon, netfid);
out:
Expand Down

0 comments on commit d17d937

Please sign in to comment.