diff options
author | Patrick McHardy <kaber@trash.net> | 2011-04-13 07:32:28 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2011-04-13 07:32:28 -0400 |
commit | b32e3dc7860d00124fa432dba09667e647cb9bcc (patch) | |
tree | 2fa6e56f389431dfb84609d3d7572cad76e88e71 /fs/ubifs/file.c | |
parent | 6604271c5bc658a6067ed0c3deba4d89e0e50382 (diff) | |
parent | 96120d86fe302c006259baee9061eea9e1b9e486 (diff) |
Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
Diffstat (limited to 'fs/ubifs/file.c')
-rw-r--r-- | fs/ubifs/file.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index d77db7e36484..28be1e6a65e8 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c | |||
@@ -448,10 +448,12 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping, | |||
448 | if (!(pos & ~PAGE_CACHE_MASK) && len == PAGE_CACHE_SIZE) { | 448 | if (!(pos & ~PAGE_CACHE_MASK) && len == PAGE_CACHE_SIZE) { |
449 | /* | 449 | /* |
450 | * We change whole page so no need to load it. But we | 450 | * We change whole page so no need to load it. But we |
451 | * have to set the @PG_checked flag to make the further | 451 | * do not know whether this page exists on the media or |
452 | * code know that the page is new. This might be not | 452 | * not, so we assume the latter because it requires |
453 | * true, but it is better to budget more than to read | 453 | * larger budget. The assumption is that it is better |
454 | * the page from the media. | 454 | * to budget a bit more than to read the page from the |
455 | * media. Thus, we are setting the @PG_checked flag | ||
456 | * here. | ||
455 | */ | 457 | */ |
456 | SetPageChecked(page); | 458 | SetPageChecked(page); |
457 | skipped_read = 1; | 459 | skipped_read = 1; |
@@ -559,6 +561,7 @@ static int ubifs_write_end(struct file *file, struct address_space *mapping, | |||
559 | dbg_gen("copied %d instead of %d, read page and repeat", | 561 | dbg_gen("copied %d instead of %d, read page and repeat", |
560 | copied, len); | 562 | copied, len); |
561 | cancel_budget(c, page, ui, appending); | 563 | cancel_budget(c, page, ui, appending); |
564 | ClearPageChecked(page); | ||
562 | 565 | ||
563 | /* | 566 | /* |
564 | * Return 0 to force VFS to repeat the whole operation, or the | 567 | * Return 0 to force VFS to repeat the whole operation, or the |