Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42527
b: refs/heads/master
c: 9cf85e0
h: refs/heads/master
i:
  42525: 7852a60
  42523: ef6ac36
  42519: 31a8a3a
  42511: 3d66dd7
  42495: cdaad9d
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Dec 6, 2006
1 parent cbdb52f commit ce11723
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3925675cb37cc9c3fd1d3f56ce0fa729f995f863
refs/heads/master: 9cf85e0a243b56f4ef8439a1e6430307fd9dcda6
10 changes: 1 addition & 9 deletions trunk/fs/nfs/pagelist.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,10 @@ long nfs_scan_dirty(struct address_space *mapping,
struct nfs_page *pgvec[NFS_SCAN_MAXENTRIES];
struct nfs_page *req;
pgoff_t idx_start, idx_end;
long count = wbc->nr_to_write;
long res = 0;
int found, i;

if (nfsi->ndirty == 0 || count <= 0)
if (nfsi->ndirty == 0)
return 0;
if (wbc->range_cyclic) {
idx_start = 0;
Expand All @@ -308,8 +307,6 @@ long nfs_scan_dirty(struct address_space *mapping,
for (;;) {
unsigned int toscan = NFS_SCAN_MAXENTRIES;

if (toscan > count)
toscan = count;
found = radix_tree_gang_lookup_tag(&nfsi->nfs_page_tree,
(void **)&pgvec[0], idx_start, toscan,
NFS_PAGE_TAG_DIRTY);
Expand All @@ -334,16 +331,11 @@ long nfs_scan_dirty(struct address_space *mapping,
res++;
if (res == LONG_MAX)
goto out;
count--;
if (count == 0)
goto out;

next:
idx_start = req->wb_index + 1;
}
}
out:
wbc->nr_to_write = count;
WARN_ON ((nfsi->ndirty == 0) != list_empty(&nfsi->dirty));
return res;
}
Expand Down

0 comments on commit ce11723

Please sign in to comment.