From a483b8c38c7f5b9874246fe1f471de0d09b2e163 Mon Sep 17 00:00:00 2001 From: Sachin Prabhu Date: Tue, 5 Mar 2013 19:25:56 +0000 Subject: [PATCH] --- yaml --- r: 360990 b: refs/heads/master c: c483a9841df1de327e01af7deb6ba349210e5f82 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/cifs/inode.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index ad46003e0ccf..e9fb2df417f8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 72d282dc5109e5dc0d963be020604e0cc82f7ed7 +refs/heads/master: c483a9841df1de327e01af7deb6ba349210e5f82 diff --git a/trunk/fs/cifs/inode.c b/trunk/fs/cifs/inode.c index e7ae45cd94ef..0079696305c9 100644 --- a/trunk/fs/cifs/inode.c +++ b/trunk/fs/cifs/inode.c @@ -995,6 +995,15 @@ cifs_rename_pending_delete(const char *full_path, struct dentry *dentry, return PTR_ERR(tlink); tcon = tlink_tcon(tlink); + /* + * We cannot rename the file if the server doesn't support + * CAP_INFOLEVEL_PASSTHRU + */ + if (!(tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU)) { + rc = -EBUSY; + goto out; + } + rc = CIFSSMBOpen(xid, tcon, full_path, FILE_OPEN, DELETE|FILE_WRITE_ATTRIBUTES, CREATE_NOT_DIR, &netfid, &oplock, NULL, cifs_sb->local_nls,