X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fnfs_page.h;h=2e555d49c9b732fa4379b8b1c17a98cb430ce857;hb=9dc6aa5fcfc104becd86c89c5e7ec90e840e0163;hp=da2e077b65e2e3b69c16b88fc8eb3e772ee43145;hpb=060de20e82195d404f7dc6a914685730376fdc80;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index da2e077b65e..2e555d49c9b 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h @@ -13,7 +13,6 @@ #include #include #include -#include #include #include @@ -31,6 +30,8 @@ #define PG_BUSY 0 #define PG_NEED_COMMIT 1 #define PG_NEED_RESCHED 2 +#define PG_NEED_FLUSH 3 +#define PG_FLUSHING 4 struct nfs_inode; struct nfs_page { @@ -61,10 +62,11 @@ extern void nfs_clear_request(struct nfs_page *req); extern void nfs_release_request(struct nfs_page *req); -extern int nfs_scan_lock_dirty(struct nfs_inode *nfsi, struct list_head *dst, - unsigned long idx_start, unsigned int npages); -extern int nfs_scan_list(struct list_head *, struct list_head *, - unsigned long, unsigned int); +extern long nfs_scan_dirty(struct address_space *mapping, + struct writeback_control *wbc, + struct list_head *dst); +extern int nfs_scan_list(struct nfs_inode *nfsi, struct list_head *head, struct list_head *dst, + unsigned long idx_start, unsigned int npages); extern int nfs_coalesce_requests(struct list_head *, struct list_head *, unsigned int); extern int nfs_wait_on_request(struct nfs_page *); @@ -79,9 +81,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 +125,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 +139,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