diff options
author | Peter Zijlstra <peterz@infradead.org> | 2014-03-17 13:06:10 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-04-18 08:20:48 -0400 |
commit | 4e857c58efeb99393cba5a5d0d8ec7117183137c (patch) | |
tree | 3f6fd464e4fddb2fe90374c075c9d06603cf8bbc /fs/nfs | |
parent | 1b15611e1c30b37abe393d411c316cd659920bf5 (diff) |
arch: Mass conversion of smp_mb__*()
Mostly scripted conversion of the smp_mb__* barriers.
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-55dhyhocezdw1dg7u19hmh1u@git.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-arch@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/dir.c | 12 | ||||
-rw-r--r-- | fs/nfs/inode.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfs4filelayoutdev.c | 4 | ||||
-rw-r--r-- | fs/nfs/nfs4state.c | 4 | ||||
-rw-r--r-- | fs/nfs/pagelist.c | 6 | ||||
-rw-r--r-- | fs/nfs/pnfs.c | 2 | ||||
-rw-r--r-- | fs/nfs/pnfs.h | 2 | ||||
-rw-r--r-- | fs/nfs/write.c | 4 |
8 files changed, 18 insertions, 18 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index d9f3d067cd15..4a3d4ef76127 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -2032,9 +2032,9 @@ static void nfs_access_free_entry(struct nfs_access_entry *entry) | |||
2032 | { | 2032 | { |
2033 | put_rpccred(entry->cred); | 2033 | put_rpccred(entry->cred); |
2034 | kfree(entry); | 2034 | kfree(entry); |
2035 | smp_mb__before_atomic_dec(); | 2035 | smp_mb__before_atomic(); |
2036 | atomic_long_dec(&nfs_access_nr_entries); | 2036 | atomic_long_dec(&nfs_access_nr_entries); |
2037 | smp_mb__after_atomic_dec(); | 2037 | smp_mb__after_atomic(); |
2038 | } | 2038 | } |
2039 | 2039 | ||
2040 | static void nfs_access_free_list(struct list_head *head) | 2040 | static void nfs_access_free_list(struct list_head *head) |
@@ -2082,9 +2082,9 @@ nfs_access_cache_scan(struct shrinker *shrink, struct shrink_control *sc) | |||
2082 | else { | 2082 | else { |
2083 | remove_lru_entry: | 2083 | remove_lru_entry: |
2084 | list_del_init(&nfsi->access_cache_inode_lru); | 2084 | list_del_init(&nfsi->access_cache_inode_lru); |
2085 | smp_mb__before_clear_bit(); | 2085 | smp_mb__before_atomic(); |
2086 | clear_bit(NFS_INO_ACL_LRU_SET, &nfsi->flags); | 2086 | clear_bit(NFS_INO_ACL_LRU_SET, &nfsi->flags); |
2087 | smp_mb__after_clear_bit(); | 2087 | smp_mb__after_atomic(); |
2088 | } | 2088 | } |
2089 | spin_unlock(&inode->i_lock); | 2089 | spin_unlock(&inode->i_lock); |
2090 | } | 2090 | } |
@@ -2232,9 +2232,9 @@ void nfs_access_add_cache(struct inode *inode, struct nfs_access_entry *set) | |||
2232 | nfs_access_add_rbtree(inode, cache); | 2232 | nfs_access_add_rbtree(inode, cache); |
2233 | 2233 | ||
2234 | /* Update accounting */ | 2234 | /* Update accounting */ |
2235 | smp_mb__before_atomic_inc(); | 2235 | smp_mb__before_atomic(); |
2236 | atomic_long_inc(&nfs_access_nr_entries); | 2236 | atomic_long_inc(&nfs_access_nr_entries); |
2237 | smp_mb__after_atomic_inc(); | 2237 | smp_mb__after_atomic(); |
2238 | 2238 | ||
2239 | /* Add inode to global LRU list */ | 2239 | /* Add inode to global LRU list */ |
2240 | if (!test_bit(NFS_INO_ACL_LRU_SET, &NFS_I(inode)->flags)) { | 2240 | if (!test_bit(NFS_INO_ACL_LRU_SET, &NFS_I(inode)->flags)) { |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 0c438973f3c8..e6f7398d2b3c 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -1085,7 +1085,7 @@ int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping) | |||
1085 | trace_nfs_invalidate_mapping_exit(inode, ret); | 1085 | trace_nfs_invalidate_mapping_exit(inode, ret); |
1086 | 1086 | ||
1087 | clear_bit_unlock(NFS_INO_INVALIDATING, bitlock); | 1087 | clear_bit_unlock(NFS_INO_INVALIDATING, bitlock); |
1088 | smp_mb__after_clear_bit(); | 1088 | smp_mb__after_atomic(); |
1089 | wake_up_bit(bitlock, NFS_INO_INVALIDATING); | 1089 | wake_up_bit(bitlock, NFS_INO_INVALIDATING); |
1090 | out: | 1090 | out: |
1091 | return ret; | 1091 | return ret; |
diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c index efac602edb37..b9c61efe9660 100644 --- a/fs/nfs/nfs4filelayoutdev.c +++ b/fs/nfs/nfs4filelayoutdev.c | |||
@@ -789,9 +789,9 @@ static void nfs4_wait_ds_connect(struct nfs4_pnfs_ds *ds) | |||
789 | 789 | ||
790 | static void nfs4_clear_ds_conn_bit(struct nfs4_pnfs_ds *ds) | 790 | static void nfs4_clear_ds_conn_bit(struct nfs4_pnfs_ds *ds) |
791 | { | 791 | { |
792 | smp_mb__before_clear_bit(); | 792 | smp_mb__before_atomic(); |
793 | clear_bit(NFS4DS_CONNECTING, &ds->ds_state); | 793 | clear_bit(NFS4DS_CONNECTING, &ds->ds_state); |
794 | smp_mb__after_clear_bit(); | 794 | smp_mb__after_atomic(); |
795 | wake_up_bit(&ds->ds_state, NFS4DS_CONNECTING); | 795 | wake_up_bit(&ds->ds_state, NFS4DS_CONNECTING); |
796 | } | 796 | } |
797 | 797 | ||
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 2349518eef2c..c0583b9bef71 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -1140,9 +1140,9 @@ static int nfs4_run_state_manager(void *); | |||
1140 | 1140 | ||
1141 | static void nfs4_clear_state_manager_bit(struct nfs_client *clp) | 1141 | static void nfs4_clear_state_manager_bit(struct nfs_client *clp) |
1142 | { | 1142 | { |
1143 | smp_mb__before_clear_bit(); | 1143 | smp_mb__before_atomic(); |
1144 | clear_bit(NFS4CLNT_MANAGER_RUNNING, &clp->cl_state); | 1144 | clear_bit(NFS4CLNT_MANAGER_RUNNING, &clp->cl_state); |
1145 | smp_mb__after_clear_bit(); | 1145 | smp_mb__after_atomic(); |
1146 | wake_up_bit(&clp->cl_state, NFS4CLNT_MANAGER_RUNNING); | 1146 | wake_up_bit(&clp->cl_state, NFS4CLNT_MANAGER_RUNNING); |
1147 | rpc_wake_up(&clp->cl_rpcwaitq); | 1147 | rpc_wake_up(&clp->cl_rpcwaitq); |
1148 | } | 1148 | } |
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 2ffebf2081ce..03ed984ab4d8 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c | |||
@@ -95,7 +95,7 @@ nfs_iocounter_dec(struct nfs_io_counter *c) | |||
95 | { | 95 | { |
96 | if (atomic_dec_and_test(&c->io_count)) { | 96 | if (atomic_dec_and_test(&c->io_count)) { |
97 | clear_bit(NFS_IO_INPROGRESS, &c->flags); | 97 | clear_bit(NFS_IO_INPROGRESS, &c->flags); |
98 | smp_mb__after_clear_bit(); | 98 | smp_mb__after_atomic(); |
99 | wake_up_bit(&c->flags, NFS_IO_INPROGRESS); | 99 | wake_up_bit(&c->flags, NFS_IO_INPROGRESS); |
100 | } | 100 | } |
101 | } | 101 | } |
@@ -193,9 +193,9 @@ void nfs_unlock_request(struct nfs_page *req) | |||
193 | printk(KERN_ERR "NFS: Invalid unlock attempted\n"); | 193 | printk(KERN_ERR "NFS: Invalid unlock attempted\n"); |
194 | BUG(); | 194 | BUG(); |
195 | } | 195 | } |
196 | smp_mb__before_clear_bit(); | 196 | smp_mb__before_atomic(); |
197 | clear_bit(PG_BUSY, &req->wb_flags); | 197 | clear_bit(PG_BUSY, &req->wb_flags); |
198 | smp_mb__after_clear_bit(); | 198 | smp_mb__after_atomic(); |
199 | wake_up_bit(&req->wb_flags, PG_BUSY); | 199 | wake_up_bit(&req->wb_flags, PG_BUSY); |
200 | } | 200 | } |
201 | 201 | ||
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index cb53d450ae32..fd9536e494bc 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c | |||
@@ -1810,7 +1810,7 @@ static void pnfs_clear_layoutcommitting(struct inode *inode) | |||
1810 | unsigned long *bitlock = &NFS_I(inode)->flags; | 1810 | unsigned long *bitlock = &NFS_I(inode)->flags; |
1811 | 1811 | ||
1812 | clear_bit_unlock(NFS_INO_LAYOUTCOMMITTING, bitlock); | 1812 | clear_bit_unlock(NFS_INO_LAYOUTCOMMITTING, bitlock); |
1813 | smp_mb__after_clear_bit(); | 1813 | smp_mb__after_atomic(); |
1814 | wake_up_bit(bitlock, NFS_INO_LAYOUTCOMMITTING); | 1814 | wake_up_bit(bitlock, NFS_INO_LAYOUTCOMMITTING); |
1815 | } | 1815 | } |
1816 | 1816 | ||
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h index 023793909778..c3058a076596 100644 --- a/fs/nfs/pnfs.h +++ b/fs/nfs/pnfs.h | |||
@@ -275,7 +275,7 @@ pnfs_get_lseg(struct pnfs_layout_segment *lseg) | |||
275 | { | 275 | { |
276 | if (lseg) { | 276 | if (lseg) { |
277 | atomic_inc(&lseg->pls_refcount); | 277 | atomic_inc(&lseg->pls_refcount); |
278 | smp_mb__after_atomic_inc(); | 278 | smp_mb__after_atomic(); |
279 | } | 279 | } |
280 | return lseg; | 280 | return lseg; |
281 | } | 281 | } |
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 9a3b6a4cd6b9..ffb9459f180b 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -405,7 +405,7 @@ int nfs_writepages(struct address_space *mapping, struct writeback_control *wbc) | |||
405 | nfs_pageio_complete(&pgio); | 405 | nfs_pageio_complete(&pgio); |
406 | 406 | ||
407 | clear_bit_unlock(NFS_INO_FLUSHING, bitlock); | 407 | clear_bit_unlock(NFS_INO_FLUSHING, bitlock); |
408 | smp_mb__after_clear_bit(); | 408 | smp_mb__after_atomic(); |
409 | wake_up_bit(bitlock, NFS_INO_FLUSHING); | 409 | wake_up_bit(bitlock, NFS_INO_FLUSHING); |
410 | 410 | ||
411 | if (err < 0) | 411 | if (err < 0) |
@@ -1458,7 +1458,7 @@ static int nfs_commit_set_lock(struct nfs_inode *nfsi, int may_wait) | |||
1458 | static void nfs_commit_clear_lock(struct nfs_inode *nfsi) | 1458 | static void nfs_commit_clear_lock(struct nfs_inode *nfsi) |
1459 | { | 1459 | { |
1460 | clear_bit(NFS_INO_COMMIT, &nfsi->flags); | 1460 | clear_bit(NFS_INO_COMMIT, &nfsi->flags); |
1461 | smp_mb__after_clear_bit(); | 1461 | smp_mb__after_atomic(); |
1462 | wake_up_bit(&nfsi->flags, NFS_INO_COMMIT); | 1462 | wake_up_bit(&nfsi->flags, NFS_INO_COMMIT); |
1463 | } | 1463 | } |
1464 | 1464 | ||