Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
3b26a2ed
Commit
3b26a2ed
authored
Oct 28, 2002
by
Hirofumi Ogawa
Committed by
Linus Torvalds
Oct 28, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] small cleanup of fat (3/3)
- cleanup - remove unneeded mark_inode_dirty() in fat_extend_dir()
parent
f4c4ca9d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
34 deletions
+15
-34
fs/fat/misc.c
fs/fat/misc.c
+0
-1
fs/vfat/namei.c
fs/vfat/namei.c
+15
-33
No files found.
fs/fat/misc.c
View file @
3b26a2ed
...
...
@@ -208,7 +208,6 @@ struct buffer_head *fat_extend_dir(struct inode *inode)
}
inode
->
i_size
+=
1
<<
MSDOS_SB
(
sb
)
->
cluster_bits
;
MSDOS_I
(
inode
)
->
mmu_private
+=
1
<<
MSDOS_SB
(
sb
)
->
cluster_bits
;
mark_inode_dirty
(
inode
);
return
res
;
}
...
...
fs/vfat/namei.c
View file @
3b26a2ed
...
...
@@ -690,42 +690,39 @@ xlate_to_uni(const char *name, int len, char *outname, int *longlen, int *outlen
return
0
;
}
static
int
vfat_fill_slots
(
struct
inode
*
dir
,
struct
msdos_dir_slot
*
ds
,
const
char
*
name
,
int
len
,
int
*
slots
,
int
is_dir
,
int
uni_xlate
)
static
int
vfat_build_slots
(
struct
inode
*
dir
,
const
char
*
name
,
int
len
,
struct
msdos_dir_slot
*
ds
,
int
*
slots
,
int
is_dir
)
{
struct
nls_table
*
nls_io
,
*
nls_disk
;
wchar_t
*
uname
;
struct
msdos_sb_info
*
sbi
=
MSDOS_SB
(
dir
->
i_sb
)
;
struct
fat_mount_options
*
opts
=
&
sbi
->
options
;
struct
msdos_dir_slot
*
ps
;
struct
msdos_dir_entry
*
de
;
unsigned
long
page
;
unsigned
char
cksum
,
lcase
;
char
*
uniname
,
msdos_name
[
MSDOS_NAME
];
int
res
,
utf8
,
slot
,
ulen
,
unilen
,
i
;
char
msdos_name
[
MSDOS_NAME
];
wchar_t
*
uname
;
int
res
,
slot
,
ulen
,
usize
,
i
;
loff_t
offset
;
*
slots
=
0
;
utf8
=
MSDOS_SB
(
dir
->
i_sb
)
->
options
.
utf8
;
nls_io
=
MSDOS_SB
(
dir
->
i_sb
)
->
nls_io
;
nls_disk
=
MSDOS_SB
(
dir
->
i_sb
)
->
nls_disk
;
res
=
vfat_valid_longname
(
name
,
len
,
opts
->
unicode_xlate
)
;
if
(
res
<
0
)
return
res
;
if
(
name
[
len
-
1
]
==
'.'
)
len
--
;
if
(
!
(
page
=
__get_free_page
(
GFP_KERNEL
)))
return
-
ENOMEM
;
un
iname
=
(
char
*
)
page
;
res
=
xlate_to_uni
(
name
,
len
,
uniname
,
&
ulen
,
&
unilen
,
uni_xlat
e
,
utf8
,
nls_io
);
un
ame
=
(
wchar_t
*
)
page
;
res
=
xlate_to_uni
(
name
,
len
,
(
char
*
)
uname
,
&
ulen
,
&
usiz
e
,
opts
->
unicode_xlate
,
opts
->
utf8
,
sbi
->
nls_io
);
if
(
res
<
0
)
goto
out_free
;
uname
=
(
wchar_t
*
)
page
;
res
=
vfat_is_used_badchars
(
uname
,
ulen
);
if
(
res
<
0
)
goto
out_free
;
res
=
vfat_create_shortname
(
dir
,
nls_disk
,
uname
,
ulen
,
res
=
vfat_create_shortname
(
dir
,
sbi
->
nls_disk
,
uname
,
ulen
,
msdos_name
,
&
lcase
);
if
(
res
<
0
)
goto
out_free
;
...
...
@@ -736,7 +733,7 @@ vfat_fill_slots(struct inode *dir, struct msdos_dir_slot *ds, const char *name,
}
/* build the entry of long file name */
*
slots
=
u
nilen
/
13
;
*
slots
=
u
size
/
13
;
for
(
cksum
=
i
=
0
;
i
<
11
;
i
++
)
{
cksum
=
(((
cksum
&
1
)
<<
7
)
|
((
cksum
&
0xfe
)
>>
1
))
+
msdos_name
[
i
];
}
...
...
@@ -774,21 +771,6 @@ vfat_fill_slots(struct inode *dir, struct msdos_dir_slot *ds, const char *name,
return
res
;
}
/* We can't get "." or ".." here - VFS takes care of those cases */
static
int
vfat_build_slots
(
struct
inode
*
dir
,
const
char
*
name
,
int
len
,
struct
msdos_dir_slot
*
ds
,
int
*
slots
,
int
is_dir
)
{
int
res
,
xlate
;
xlate
=
MSDOS_SB
(
dir
->
i_sb
)
->
options
.
unicode_xlate
;
res
=
vfat_valid_longname
(
name
,
len
,
xlate
);
if
(
res
<
0
)
return
res
;
return
vfat_fill_slots
(
dir
,
ds
,
name
,
len
,
slots
,
is_dir
,
xlate
);
}
static
int
vfat_add_entry
(
struct
inode
*
dir
,
struct
qstr
*
qname
,
int
is_dir
,
struct
vfat_slot_info
*
sinfo_out
,
struct
buffer_head
**
bh
,
struct
msdos_dir_entry
**
de
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment