From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] remove fat_search_long() in vfat_add_entry()
Date: Mon, 30 Sep 2002 04:52:00 +0900 [thread overview]
Message-ID: <87r8fck1zz.fsf@devron.myhome.or.jp> (raw)
Hi,
This patch removes the fat_search_long() in the vfat_add_entry(). This
path is already checked by the vfs layer whether file/directory
exists. So, we don't need the fat_search_long() in vfat_add_entry().
The following is the result of created the 1000 files,
2.5.39
root@devron (a)[1007]# time ../../create
real 0m2.761s
user 0m0.006s
sys 0m2.752s
root@devron (a)[1008]#
2.5.39 + patch
root@devron (a)[1007]# time ../../create
real 0m1.601s
user 0m0.008s
sys 0m1.575s
root@devron (a)[1008]#
Please apply.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
--- linux-2.5/fs/vfat/namei.c~ 2002-09-29 16:44:00.000000000 +0900
+++ linux-2.5/fs/vfat/namei.c 2002-09-29 17:36:08.000000000 +0900
@@ -890,7 +890,6 @@ static int vfat_add_entry(struct inode *
struct msdos_dir_entry *dummy_de;
struct buffer_head *dummy_bh;
int dummy_ino;
- loff_t dummy;
dir_slots = (struct msdos_dir_slot *)
kmalloc(sizeof(struct msdos_dir_slot) * MSDOS_SLOTS, GFP_KERNEL);
@@ -900,15 +899,6 @@ static int vfat_add_entry(struct inode *
len = qname->len;
while (len && qname->name[len-1] == '.')
len--;
- res = fat_search_long(dir, qname->name, len,
- (MSDOS_SB(sb)->options.name_check != 's')
- || !MSDOS_SB(sb)->options.posixfs,
- &dummy, &dummy);
- if (res > 0) /* found */
- res = -EEXIST;
- if (res)
- goto cleanup;
-
res = vfat_build_slots(dir, qname->name, len,
dir_slots, &slots, is_dir);
if (res < 0)
reply other threads:[~2002-09-29 19:48 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=87r8fck1zz.fsf@devron.myhome.or.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome