mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 10:01:25 +00:00
hfsplus: use atomic bitops for the superblock flags
The flags in the HFS+-specific superlock do get modified during runtime, use atomic bitops to make the modifications SMP safe. Signed-off-by: Christoph Hellwig <hch@tuxera.com>
This commit is contained in:
parent
7ac9fb9c2a
commit
84adede312
6 changed files with 30 additions and 28 deletions
|
@ -132,7 +132,7 @@ int hfsplus_uni2asc(struct super_block *sb, const struct hfsplus_unistr *ustr, c
|
|||
ustrlen = be16_to_cpu(ustr->length);
|
||||
len = *len_p;
|
||||
ce1 = NULL;
|
||||
compose = !(HFSPLUS_SB(sb)->flags & HFSPLUS_SB_NODECOMPOSE);
|
||||
compose = !test_bit(HFSPLUS_SB_NODECOMPOSE, &HFSPLUS_SB(sb)->flags);
|
||||
|
||||
while (ustrlen > 0) {
|
||||
c0 = be16_to_cpu(*ip++);
|
||||
|
@ -293,7 +293,7 @@ int hfsplus_asc2uni(struct super_block *sb, struct hfsplus_unistr *ustr,
|
|||
u16 *dstr, outlen = 0;
|
||||
wchar_t c;
|
||||
|
||||
decompose = !(HFSPLUS_SB(sb)->flags & HFSPLUS_SB_NODECOMPOSE);
|
||||
decompose = !test_bit(HFSPLUS_SB_NODECOMPOSE, &HFSPLUS_SB(sb)->flags);
|
||||
while (outlen < HFSPLUS_MAX_STRLEN && len > 0) {
|
||||
size = asc2unichar(sb, astr, len, &c);
|
||||
|
||||
|
@ -330,8 +330,8 @@ int hfsplus_hash_dentry(struct dentry *dentry, struct qstr *str)
|
|||
wchar_t c;
|
||||
u16 c2;
|
||||
|
||||
casefold = (HFSPLUS_SB(sb)->flags & HFSPLUS_SB_CASEFOLD);
|
||||
decompose = !(HFSPLUS_SB(sb)->flags & HFSPLUS_SB_NODECOMPOSE);
|
||||
casefold = test_bit(HFSPLUS_SB_CASEFOLD, &HFSPLUS_SB(sb)->flags);
|
||||
decompose = !test_bit(HFSPLUS_SB_NODECOMPOSE, &HFSPLUS_SB(sb)->flags);
|
||||
hash = init_name_hash();
|
||||
astr = str->name;
|
||||
len = str->len;
|
||||
|
@ -373,8 +373,8 @@ int hfsplus_compare_dentry(struct dentry *dentry, struct qstr *s1, struct qstr *
|
|||
u16 c1, c2;
|
||||
wchar_t c;
|
||||
|
||||
casefold = (HFSPLUS_SB(sb)->flags & HFSPLUS_SB_CASEFOLD);
|
||||
decompose = !(HFSPLUS_SB(sb)->flags & HFSPLUS_SB_NODECOMPOSE);
|
||||
casefold = test_bit(HFSPLUS_SB_CASEFOLD, &HFSPLUS_SB(sb)->flags);
|
||||
decompose = !test_bit(HFSPLUS_SB_NODECOMPOSE, &HFSPLUS_SB(sb)->flags);
|
||||
astr1 = s1->name;
|
||||
len1 = s1->len;
|
||||
astr2 = s2->name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue