diff options
author | Chuck Lever <cel@netapp.com> | 2005-11-30 18:08:59 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-01-06 14:58:48 -0500 |
commit | a911fd9a6046200e439b4af172e8379c0942eec3 (patch) | |
tree | f67582f100edef03085705fc919b4b068775d57a /include/linux/nfs_page.h | |
parent | 6b59a75460eb9527145d7bd55068e5d32bee8a44 (diff) |
NFS: simplify inlined bit ops in nfs_page.h
Minor cleanup: inlined bit ops in nfs_page.h can be simpler.
Test plan:
Write-intensive workload against a server that requires COMMITs.
Signed-off-by: Chuck Lever <cel@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/nfs_page.h')
-rw-r--r-- | include/linux/nfs_page.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index da2e077b65e2..66e2ed658527 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
@@ -79,9 +79,7 @@ extern void nfs_clear_page_writeback(struct nfs_page *req); | |||
79 | static inline int | 79 | static inline int |
80 | nfs_lock_request_dontget(struct nfs_page *req) | 80 | nfs_lock_request_dontget(struct nfs_page *req) |
81 | { | 81 | { |
82 | if (test_and_set_bit(PG_BUSY, &req->wb_flags)) | 82 | return !test_and_set_bit(PG_BUSY, &req->wb_flags); |
83 | return 0; | ||
84 | return 1; | ||
85 | } | 83 | } |
86 | 84 | ||
87 | /* | 85 | /* |
@@ -125,9 +123,7 @@ nfs_list_remove_request(struct nfs_page *req) | |||
125 | static inline int | 123 | static inline int |
126 | nfs_defer_commit(struct nfs_page *req) | 124 | nfs_defer_commit(struct nfs_page *req) |
127 | { | 125 | { |
128 | if (test_and_set_bit(PG_NEED_COMMIT, &req->wb_flags)) | 126 | return !test_and_set_bit(PG_NEED_COMMIT, &req->wb_flags); |
129 | return 0; | ||
130 | return 1; | ||
131 | } | 127 | } |
132 | 128 | ||
133 | static inline void | 129 | static inline void |
@@ -141,9 +137,7 @@ nfs_clear_commit(struct nfs_page *req) | |||
141 | static inline int | 137 | static inline int |
142 | nfs_defer_reschedule(struct nfs_page *req) | 138 | nfs_defer_reschedule(struct nfs_page *req) |
143 | { | 139 | { |
144 | if (test_and_set_bit(PG_NEED_RESCHED, &req->wb_flags)) | 140 | return !test_and_set_bit(PG_NEED_RESCHED, &req->wb_flags); |
145 | return 0; | ||
146 | return 1; | ||
147 | } | 141 | } |
148 | 142 | ||
149 | static inline void | 143 | static inline void |