From: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
To: <linux-btrfs@vger.kernel.org>
Cc: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
Subject: [PATCH] btrfs-progs: remove uneccessary subvol name check for subvol deletion
Date: Thu, 18 Dec 2014 11:32:35 +0800 [thread overview]
Message-ID: <1418873555-4530-1-git-send-email-guihc.fnst@cn.fujitsu.com> (raw)
When we want to delete a subvol, we first check to see whether it is
a subvolume or not. After the check, we are sure that it is a valid
subvol, don't have to check its name.
Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
---
cmds-subvolume.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index 53eec46..a35e2ad 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -281,21 +281,6 @@ again:
vname = basename(dupvname);
free(cpath);
- if (!test_issubvolname(vname)) {
- fprintf(stderr, "ERROR: incorrect subvolume name '%s'\n",
- vname);
- ret = 1;
- goto out;
- }
-
- len = strlen(vname);
- if (len == 0 || len >= BTRFS_VOL_NAME_MAX) {
- fprintf(stderr, "ERROR: snapshot name too long '%s'\n",
- vname);
- ret = 1;
- goto out;
- }
-
fd = open_file_or_dir(dname, &dirstream);
if (fd < 0) {
fprintf(stderr, "ERROR: can't access '%s'\n", dname);
--
1.8.1.4
reply other threads:[~2014-12-18 3:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1418873555-4530-1-git-send-email-guihc.fnst@cn.fujitsu.com \
--to=guihc.fnst@cn.fujitsu.com \
--cc=linux-btrfs@vger.kernel.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.