diff options
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index a13165c871c2..3fdd30add4f9 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -144,10 +144,10 @@ void mnt_release_group_id(struct mount *mnt) | |||
144 | static inline void mnt_add_count(struct mount *mnt, int n) | 144 | static inline void mnt_add_count(struct mount *mnt, int n) |
145 | { | 145 | { |
146 | #ifdef CONFIG_SMP | 146 | #ifdef CONFIG_SMP |
147 | this_cpu_add(mnt->mnt.mnt_pcp->mnt_count, n); | 147 | this_cpu_add(mnt->mnt_pcp->mnt_count, n); |
148 | #else | 148 | #else |
149 | preempt_disable(); | 149 | preempt_disable(); |
150 | mnt->mnt.mnt_count += n; | 150 | mnt->mnt_count += n; |
151 | preempt_enable(); | 151 | preempt_enable(); |
152 | #endif | 152 | #endif |
153 | } | 153 | } |
@@ -162,12 +162,12 @@ unsigned int mnt_get_count(struct mount *mnt) | |||
162 | int cpu; | 162 | int cpu; |
163 | 163 | ||
164 | for_each_possible_cpu(cpu) { | 164 | for_each_possible_cpu(cpu) { |
165 | count += per_cpu_ptr(mnt->mnt.mnt_pcp, cpu)->mnt_count; | 165 | count += per_cpu_ptr(mnt->mnt_pcp, cpu)->mnt_count; |
166 | } | 166 | } |
167 | 167 | ||
168 | return count; | 168 | return count; |
169 | #else | 169 | #else |
170 | return mnt->mnt.mnt_count; | 170 | return mnt->mnt_count; |
171 | #endif | 171 | #endif |
172 | } | 172 | } |
173 | 173 | ||
@@ -189,14 +189,14 @@ static struct mount *alloc_vfsmnt(const char *name) | |||
189 | } | 189 | } |
190 | 190 | ||
191 | #ifdef CONFIG_SMP | 191 | #ifdef CONFIG_SMP |
192 | mnt->mnt_pcp = alloc_percpu(struct mnt_pcp); | 192 | p->mnt_pcp = alloc_percpu(struct mnt_pcp); |
193 | if (!mnt->mnt_pcp) | 193 | if (!p->mnt_pcp) |
194 | goto out_free_devname; | 194 | goto out_free_devname; |
195 | 195 | ||
196 | this_cpu_add(mnt->mnt_pcp->mnt_count, 1); | 196 | this_cpu_add(p->mnt_pcp->mnt_count, 1); |
197 | #else | 197 | #else |
198 | mnt->mnt_count = 1; | 198 | p->mnt_count = 1; |
199 | mnt->mnt_writers = 0; | 199 | p->mnt_writers = 0; |
200 | #endif | 200 | #endif |
201 | 201 | ||
202 | INIT_LIST_HEAD(&p->mnt_hash); | 202 | INIT_LIST_HEAD(&p->mnt_hash); |
@@ -256,18 +256,18 @@ EXPORT_SYMBOL_GPL(__mnt_is_readonly); | |||
256 | static inline void mnt_inc_writers(struct mount *mnt) | 256 | static inline void mnt_inc_writers(struct mount *mnt) |
257 | { | 257 | { |
258 | #ifdef CONFIG_SMP | 258 | #ifdef CONFIG_SMP |
259 | this_cpu_inc(mnt->mnt.mnt_pcp->mnt_writers); | 259 | this_cpu_inc(mnt->mnt_pcp->mnt_writers); |
260 | #else | 260 | #else |
261 | mnt->mnt.mnt_writers++; | 261 | mnt->mnt_writers++; |
262 | #endif | 262 | #endif |
263 | } | 263 | } |
264 | 264 | ||
265 | static inline void mnt_dec_writers(struct mount *mnt) | 265 | static inline void mnt_dec_writers(struct mount *mnt) |
266 | { | 266 | { |
267 | #ifdef CONFIG_SMP | 267 | #ifdef CONFIG_SMP |
268 | this_cpu_dec(mnt->mnt.mnt_pcp->mnt_writers); | 268 | this_cpu_dec(mnt->mnt_pcp->mnt_writers); |
269 | #else | 269 | #else |
270 | mnt->mnt.mnt_writers--; | 270 | mnt->mnt_writers--; |
271 | #endif | 271 | #endif |
272 | } | 272 | } |
273 | 273 | ||
@@ -278,7 +278,7 @@ static unsigned int mnt_get_writers(struct mount *mnt) | |||
278 | int cpu; | 278 | int cpu; |
279 | 279 | ||
280 | for_each_possible_cpu(cpu) { | 280 | for_each_possible_cpu(cpu) { |
281 | count += per_cpu_ptr(mnt->mnt.mnt_pcp, cpu)->mnt_writers; | 281 | count += per_cpu_ptr(mnt->mnt_pcp, cpu)->mnt_writers; |
282 | } | 282 | } |
283 | 283 | ||
284 | return count; | 284 | return count; |
@@ -454,7 +454,7 @@ static void free_vfsmnt(struct mount *mnt) | |||
454 | kfree(mnt->mnt.mnt_devname); | 454 | kfree(mnt->mnt.mnt_devname); |
455 | mnt_free_id(mnt); | 455 | mnt_free_id(mnt); |
456 | #ifdef CONFIG_SMP | 456 | #ifdef CONFIG_SMP |
457 | free_percpu(mnt->mnt.mnt_pcp); | 457 | free_percpu(mnt->mnt_pcp); |
458 | #endif | 458 | #endif |
459 | kmem_cache_free(mnt_cache, mnt); | 459 | kmem_cache_free(mnt_cache, mnt); |
460 | } | 460 | } |
@@ -594,7 +594,7 @@ static void attach_mnt(struct mount *mnt, struct path *path) | |||
594 | static inline void __mnt_make_longterm(struct mount *mnt) | 594 | static inline void __mnt_make_longterm(struct mount *mnt) |
595 | { | 595 | { |
596 | #ifdef CONFIG_SMP | 596 | #ifdef CONFIG_SMP |
597 | atomic_inc(&mnt->mnt.mnt_longterm); | 597 | atomic_inc(&mnt->mnt_longterm); |
598 | #endif | 598 | #endif |
599 | } | 599 | } |
600 | 600 | ||
@@ -602,7 +602,7 @@ static inline void __mnt_make_longterm(struct mount *mnt) | |||
602 | static inline void __mnt_make_shortterm(struct mount *mnt) | 602 | static inline void __mnt_make_shortterm(struct mount *mnt) |
603 | { | 603 | { |
604 | #ifdef CONFIG_SMP | 604 | #ifdef CONFIG_SMP |
605 | atomic_dec(&mnt->mnt.mnt_longterm); | 605 | atomic_dec(&mnt->mnt_longterm); |
606 | #endif | 606 | #endif |
607 | } | 607 | } |
608 | 608 | ||
@@ -769,7 +769,7 @@ static void mntput_no_expire(struct vfsmount *m) | |||
769 | put_again: | 769 | put_again: |
770 | #ifdef CONFIG_SMP | 770 | #ifdef CONFIG_SMP |
771 | br_read_lock(vfsmount_lock); | 771 | br_read_lock(vfsmount_lock); |
772 | if (likely(atomic_read(&mnt->mnt.mnt_longterm))) { | 772 | if (likely(atomic_read(&mnt->mnt_longterm))) { |
773 | mnt_add_count(mnt, -1); | 773 | mnt_add_count(mnt, -1); |
774 | br_read_unlock(vfsmount_lock); | 774 | br_read_unlock(vfsmount_lock); |
775 | return; | 775 | return; |
@@ -2375,10 +2375,10 @@ void mnt_make_shortterm(struct vfsmount *m) | |||
2375 | { | 2375 | { |
2376 | #ifdef CONFIG_SMP | 2376 | #ifdef CONFIG_SMP |
2377 | struct mount *mnt = real_mount(m); | 2377 | struct mount *mnt = real_mount(m); |
2378 | if (atomic_add_unless(&mnt->mnt.mnt_longterm, -1, 1)) | 2378 | if (atomic_add_unless(&mnt->mnt_longterm, -1, 1)) |
2379 | return; | 2379 | return; |
2380 | br_write_lock(vfsmount_lock); | 2380 | br_write_lock(vfsmount_lock); |
2381 | atomic_dec(&mnt->mnt.mnt_longterm); | 2381 | atomic_dec(&mnt->mnt_longterm); |
2382 | br_write_unlock(vfsmount_lock); | 2382 | br_write_unlock(vfsmount_lock); |
2383 | #endif | 2383 | #endif |
2384 | } | 2384 | } |