Commit a911fd9a authored by Chuck Lever's avatar Chuck Lever Committed by Trond Myklebust

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: default avatarChuck Lever <cel@netapp.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 6b59a754
...@@ -79,9 +79,7 @@ extern void nfs_clear_page_writeback(struct nfs_page *req); ...@@ -79,9 +79,7 @@ extern void nfs_clear_page_writeback(struct nfs_page *req);
static inline int static inline int
nfs_lock_request_dontget(struct nfs_page *req) nfs_lock_request_dontget(struct nfs_page *req)
{ {
if (test_and_set_bit(PG_BUSY, &req->wb_flags)) return !test_and_set_bit(PG_BUSY, &req->wb_flags);
return 0;
return 1;
} }
/* /*
...@@ -125,9 +123,7 @@ nfs_list_remove_request(struct nfs_page *req) ...@@ -125,9 +123,7 @@ nfs_list_remove_request(struct nfs_page *req)
static inline int static inline int
nfs_defer_commit(struct nfs_page *req) nfs_defer_commit(struct nfs_page *req)
{ {
if (test_and_set_bit(PG_NEED_COMMIT, &req->wb_flags)) return !test_and_set_bit(PG_NEED_COMMIT, &req->wb_flags);
return 0;
return 1;
} }
static inline void static inline void
...@@ -141,9 +137,7 @@ nfs_clear_commit(struct nfs_page *req) ...@@ -141,9 +137,7 @@ nfs_clear_commit(struct nfs_page *req)
static inline int static inline int
nfs_defer_reschedule(struct nfs_page *req) nfs_defer_reschedule(struct nfs_page *req)
{ {
if (test_and_set_bit(PG_NEED_RESCHED, &req->wb_flags)) return !test_and_set_bit(PG_NEED_RESCHED, &req->wb_flags);
return 0;
return 1;
} }
static inline void static inline void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment