summaryrefslogtreecommitdiff
path: root/fs/fat
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-04-27 11:11:07 +0200
committerThomas Gleixner <tglx@linutronix.de>2010-04-27 11:11:07 +0200
commit846bcf3923056965c3fc0c9ba811c10d25af75e5 (patch)
treec39bd4273a006da2fb1f727ebb7eb1108f5526c8 /fs/fat
parent863c3ad87b10617464fc52c21fc7e31987910559 (diff)
parent3e7ad8ed979ce9e3ad897dd87c50bf577966f89c (diff)
downloadlwn-846bcf3923056965c3fc0c9ba811c10d25af75e5.tar.gz
lwn-846bcf3923056965c3fc0c9ba811c10d25af75e5.zip
Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.33.y into rt/2.6.33 Conflicts: Makefile arch/x86/include/asm/rwsem.h Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/fat')
-rw-r--r--fs/fat/namei_vfat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c
index f565f24019b5..72646e2c0f48 100644
--- a/fs/fat/namei_vfat.c
+++ b/fs/fat/namei_vfat.c
@@ -309,7 +309,7 @@ static int vfat_create_shortname(struct inode *dir, struct nls_table *nls,
{
struct fat_mount_options *opts = &MSDOS_SB(dir->i_sb)->options;
wchar_t *ip, *ext_start, *end, *name_start;
- unsigned char base[9], ext[4], buf[8], *p;
+ unsigned char base[9], ext[4], buf[5], *p;
unsigned char charbuf[NLS_MAX_CHARSET_SIZE];
int chl, chi;
int sz = 0, extlen, baselen, i, numtail_baselen, numtail2_baselen;
@@ -467,7 +467,7 @@ static int vfat_create_shortname(struct inode *dir, struct nls_table *nls,
return 0;
}
- i = jiffies & 0xffff;
+ i = jiffies;
sz = (jiffies >> 16) & 0x7;
if (baselen > 2) {
baselen = numtail2_baselen;
@@ -476,7 +476,7 @@ static int vfat_create_shortname(struct inode *dir, struct nls_table *nls,
name_res[baselen + 4] = '~';
name_res[baselen + 5] = '1' + sz;
while (1) {
- sprintf(buf, "%04X", i);
+ snprintf(buf, sizeof(buf), "%04X", i & 0xffff);
memcpy(&name_res[baselen], buf, 4);
if (vfat_find_form(dir, name_res) < 0)
break;