summaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_page.h
diff options
context:
space:
mode:
authorChuck Lever <cel@netapp.com>2005-11-30 18:08:59 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-01-06 14:58:48 -0500
commita911fd9a6046200e439b4af172e8379c0942eec3 (patch)
treef67582f100edef03085705fc919b4b068775d57a /include/linux/nfs_page.h
parent6b59a75460eb9527145d7bd55068e5d32bee8a44 (diff)
downloadop-kernel-dev-a911fd9a6046200e439b4af172e8379c0942eec3.zip
op-kernel-dev-a911fd9a6046200e439b4af172e8379c0942eec3.tar.gz
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.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
index da2e077b..66e2ed6 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);
static inline int
nfs_lock_request_dontget(struct nfs_page *req)
{
- if (test_and_set_bit(PG_BUSY, &req->wb_flags))
- return 0;
- return 1;
+ return !test_and_set_bit(PG_BUSY, &req->wb_flags);
}
/*
@@ -125,9 +123,7 @@ nfs_list_remove_request(struct nfs_page *req)
static inline int
nfs_defer_commit(struct nfs_page *req)
{
- if (test_and_set_bit(PG_NEED_COMMIT, &req->wb_flags))
- return 0;
- return 1;
+ return !test_and_set_bit(PG_NEED_COMMIT, &req->wb_flags);
}
static inline void
@@ -141,9 +137,7 @@ nfs_clear_commit(struct nfs_page *req)
static inline int
nfs_defer_reschedule(struct nfs_page *req)
{
- if (test_and_set_bit(PG_NEED_RESCHED, &req->wb_flags))
- return 0;
- return 1;
+ return !test_and_set_bit(PG_NEED_RESCHED, &req->wb_flags);
}
static inline void
OpenPOWER on IntegriCloud