From: Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: linux-cifs <linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH 3/3] cifs: Return EBUSY instead of ETXTBSY in cifs_rename_pending_delete()
Date: Tue, 5 Mar 2013 19:25:57 +0000 [thread overview]
Message-ID: <1362511557-22607-4-git-send-email-sprabhu@redhat.com> (raw)
In-Reply-To: <1362511557-22607-1-git-send-email-sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Instead of remapping ETXTBSY errors to EBUSY in cifs_unlink, replace all
cases of ETXTBSY in cifs_rename_pending_delete() with EBUSY.
Signed-off-by: Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
fs/cifs/inode.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index fee2d40..0ab0328 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -1034,7 +1034,7 @@ cifs_rename_pending_delete(const char *full_path, struct dentry *dentry,
cifs_sb->mnt_cifs_flags &
CIFS_MOUNT_MAP_SPECIAL_CHR);
if (rc != 0) {
- rc = -ETXTBSY;
+ rc = -EBUSY;
goto undo_setattr;
}
@@ -1053,7 +1053,7 @@ cifs_rename_pending_delete(const char *full_path, struct dentry *dentry,
if (rc == -ENOENT)
rc = 0;
else if (rc != 0) {
- rc = -ETXTBSY;
+ rc = -EBUSY;
goto undo_rename;
}
cifsInode->delete_pending = true;
@@ -1167,8 +1167,6 @@ psx_del_no_retry:
if (rc == 0)
cifs_drop_nlink(inode);
}
- if (rc == -ETXTBSY)
- rc = -EBUSY;
} else if ((rc == -EACCES) && (dosattr == 0) && inode) {
attrs = kzalloc(sizeof(*attrs), GFP_KERNEL);
if (attrs == NULL) {
--
1.7.11.7
next prev parent reply other threads:[~2013-03-05 19:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-05 19:25 [PATCH 0/3] Improvements to cifs_rename_pending_delete() Sachin Prabhu
[not found] ` <1362511557-22607-1-git-send-email-sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-03-05 19:25 ` [PATCH 1/3] cifs: Fix bug when checking error condition in cifs_rename_pending_delete() Sachin Prabhu
[not found] ` <1362511557-22607-2-git-send-email-sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-03-06 12:35 ` Jeff Layton
[not found] ` <20130306073515.0015029b-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2013-03-06 15:39 ` Pavel Shilovsky
2013-03-05 19:25 ` [PATCH 2/3] cifs: Check server capability before attempting silly rename Sachin Prabhu
[not found] ` <1362511557-22607-3-git-send-email-sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-03-06 12:36 ` Jeff Layton
2013-03-05 19:25 ` Sachin Prabhu [this message]
[not found] ` <1362511557-22607-4-git-send-email-sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-03-06 12:39 ` [PATCH 3/3] cifs: Return EBUSY instead of ETXTBSY in cifs_rename_pending_delete() Jeff Layton
[not found] ` <20130306073902.729a62cd-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2013-03-07 0:32 ` Steve French
[not found] ` <CAH2r5muN23HcNAwSkgFHg9rWfLw4mV=TaVUiKG71bsH_-M22yA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-03-07 1:48 ` Jeff Layton
2013-03-08 18:41 ` Sachin Prabhu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1362511557-22607-4-git-send-email-sprabhu@redhat.com \
--to=sprabhu-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.