diff options
Diffstat (limited to 'fs/gfs2/quota.c')
-rw-r--r-- | fs/gfs2/quota.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 49667d68769e..8f02d3db8f42 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c | |||
@@ -77,7 +77,7 @@ static LIST_HEAD(qd_lru_list); | |||
77 | static atomic_t qd_lru_count = ATOMIC_INIT(0); | 77 | static atomic_t qd_lru_count = ATOMIC_INIT(0); |
78 | static DEFINE_SPINLOCK(qd_lru_lock); | 78 | static DEFINE_SPINLOCK(qd_lru_lock); |
79 | 79 | ||
80 | int gfs2_shrink_qd_memory(int nr, gfp_t gfp_mask) | 80 | int gfs2_shrink_qd_memory(struct shrinker *shrink, int nr, gfp_t gfp_mask) |
81 | { | 81 | { |
82 | struct gfs2_quota_data *qd; | 82 | struct gfs2_quota_data *qd; |
83 | struct gfs2_sbd *sdp; | 83 | struct gfs2_sbd *sdp; |
@@ -694,10 +694,8 @@ get_a_page: | |||
694 | if (!buffer_mapped(bh)) | 694 | if (!buffer_mapped(bh)) |
695 | goto unlock_out; | 695 | goto unlock_out; |
696 | /* If it's a newly allocated disk block for quota, zero it */ | 696 | /* If it's a newly allocated disk block for quota, zero it */ |
697 | if (buffer_new(bh)) { | 697 | if (buffer_new(bh)) |
698 | memset(bh->b_data, 0, bh->b_size); | 698 | zero_user(page, pos - blocksize, bh->b_size); |
699 | set_buffer_uptodate(bh); | ||
700 | } | ||
701 | } | 699 | } |
702 | 700 | ||
703 | if (PageUptodate(page)) | 701 | if (PageUptodate(page)) |
@@ -723,7 +721,7 @@ get_a_page: | |||
723 | 721 | ||
724 | /* If quota straddles page boundary, we need to update the rest of the | 722 | /* If quota straddles page boundary, we need to update the rest of the |
725 | * quota at the beginning of the next page */ | 723 | * quota at the beginning of the next page */ |
726 | if (offset != 0) { /* first page, offset is closer to PAGE_CACHE_SIZE */ | 724 | if ((offset + sizeof(struct gfs2_quota)) > PAGE_CACHE_SIZE) { |
727 | ptr = ptr + nbytes; | 725 | ptr = ptr + nbytes; |
728 | nbytes = sizeof(struct gfs2_quota) - nbytes; | 726 | nbytes = sizeof(struct gfs2_quota) - nbytes; |
729 | offset = 0; | 727 | offset = 0; |