From 3eba0401f214929b1b53cc6fc87402bf4bc5041a Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Thu, 16 Oct 2008 19:27:12 -0400 Subject: [PATCH] --- yaml --- r: 117582 b: refs/heads/master c: dd1db2dedc4f6ad736fbba5aa6ecfe6e7c8ee0f4 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/cifs/inode.c | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 2b91fd4e0b20..90989e2d9faa 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 469ee614aaa367d9cde01cbdd2027212f56c6cc6 +refs/heads/master: dd1db2dedc4f6ad736fbba5aa6ecfe6e7c8ee0f4 diff --git a/trunk/fs/cifs/inode.c b/trunk/fs/cifs/inode.c index a8c833345fc9..fe4f2ee97b6c 100644 --- a/trunk/fs/cifs/inode.c +++ b/trunk/fs/cifs/inode.c @@ -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) @@ -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;