diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-20 13:44:37 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-20 13:44:37 -0500 |
commit | 5db3a7b2cabe8f0957683f798c4f8fa8605f9ebb (patch) | |
tree | 969aa2e7561796b3b8796a2f6645693f7ebe8d20 /fs/nfs | |
parent | a8881f5a5c723f82da84b786d3ca83a0df9e0c33 (diff) | |
download | blackbird-op-linux-5db3a7b2cabe8f0957683f798c4f8fa8605f9ebb.tar.gz blackbird-op-linux-5db3a7b2cabe8f0957683f798c4f8fa8605f9ebb.zip |
NFS: Debugging code for nfs_direct_(read|write)_schedule()
Make sure that we're doing our list accounting correctly.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/direct.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index e6585b9ff45a..1e3725e51df1 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -339,6 +339,7 @@ static void nfs_direct_read_schedule(struct nfs_direct_req *dreq) if (count < rsize) bytes = count; + BUG_ON(list_empty(list)); data = list_entry(list->next, struct nfs_read_data, pages); list_del_init(&data->pages); @@ -378,6 +379,7 @@ static void nfs_direct_read_schedule(struct nfs_direct_req *dreq) count -= bytes; } while (count != 0); + BUG_ON(!list_empty(list)); } static ssize_t nfs_direct_read(struct kiocb *iocb, unsigned long user_addr, size_t count, loff_t pos, struct page **pages, unsigned int nr_pages) @@ -657,6 +659,7 @@ static void nfs_direct_write_schedule(struct nfs_direct_req *dreq, int sync) if (count < wsize) bytes = count; + BUG_ON(list_empty(list)); data = list_entry(list->next, struct nfs_write_data, pages); list_move_tail(&data->pages, &dreq->rewrite_list); @@ -697,6 +700,7 @@ static void nfs_direct_write_schedule(struct nfs_direct_req *dreq, int sync) count -= bytes; } while (count != 0); + BUG_ON(!list_empty(list)); } static ssize_t nfs_direct_write(struct kiocb *iocb, unsigned long user_addr, size_t count, loff_t pos, struct page **pages, int nr_pages) |