Magellan Linux

Contents of /trunk/kernel26-alx/patches-2.6.23-r1/0106-2.6.23.7-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 658 - (show annotations) (download)
Mon Jun 23 21:39:39 2008 UTC (15 years, 10 months ago) by niro
File size: 4539 byte(s)
2.6.23-alx-r1: new default as we fix the via epia clocksource=tsc quircks
-linux-2.6.23.17
-fbcondecor-0.9.4
-squashfs-3.3
-unionfs-2.3.3
-ipw3945-1.2.2
-mptbase-vmware fix

1 diff --git a/fs/minix/itree_v1.c b/fs/minix/itree_v1.c
2 index 1a5f3bf..82d6554 100644
3 --- a/fs/minix/itree_v1.c
4 +++ b/fs/minix/itree_v1.c
5 @@ -23,11 +23,16 @@ static inline block_t *i_data(struct inode *inode)
6 static int block_to_path(struct inode * inode, long block, int offsets[DEPTH])
7 {
8 int n = 0;
9 + char b[BDEVNAME_SIZE];
10
11 if (block < 0) {
12 - printk("minix_bmap: block<0\n");
13 + printk("MINIX-fs: block_to_path: block %ld < 0 on dev %s\n",
14 + block, bdevname(inode->i_sb->s_bdev, b));
15 } else if (block >= (minix_sb(inode->i_sb)->s_max_size/BLOCK_SIZE)) {
16 - printk("minix_bmap: block>big\n");
17 + if (printk_ratelimit())
18 + printk("MINIX-fs: block_to_path: "
19 + "block %ld too big on dev %s\n",
20 + block, bdevname(inode->i_sb->s_bdev, b));
21 } else if (block < 7) {
22 offsets[n++] = block;
23 } else if ((block -= 7) < 512) {
24 diff --git a/fs/minix/itree_v2.c b/fs/minix/itree_v2.c
25 index ad8f0de..f230109 100644
26 --- a/fs/minix/itree_v2.c
27 +++ b/fs/minix/itree_v2.c
28 @@ -23,12 +23,17 @@ static inline block_t *i_data(struct inode *inode)
29 static int block_to_path(struct inode * inode, long block, int offsets[DEPTH])
30 {
31 int n = 0;
32 + char b[BDEVNAME_SIZE];
33 struct super_block *sb = inode->i_sb;
34
35 if (block < 0) {
36 - printk("minix_bmap: block<0\n");
37 + printk("MINIX-fs: block_to_path: block %ld < 0 on dev %s\n",
38 + block, bdevname(sb->s_bdev, b));
39 } else if (block >= (minix_sb(inode->i_sb)->s_max_size/sb->s_blocksize)) {
40 - printk("minix_bmap: block>big\n");
41 + if (printk_ratelimit())
42 + printk("MINIX-fs: block_to_path: "
43 + "block %ld too big on dev %s\n",
44 + block, bdevname(sb->s_bdev, b));
45 } else if (block < 7) {
46 offsets[n++] = block;
47 } else if ((block -= 7) < 256) {
48 diff --git a/fs/nfs/write.c b/fs/nfs/write.c
49 index 0d7a77c..a2a4865 100644
50 --- a/fs/nfs/write.c
51 +++ b/fs/nfs/write.c
52 @@ -167,8 +167,6 @@ static void nfs_mark_uptodate(struct page *page, unsigned int base, unsigned int
53 return;
54 if (count != nfs_page_length(page))
55 return;
56 - if (count != PAGE_CACHE_SIZE)
57 - zero_user_page(page, count, PAGE_CACHE_SIZE - count, KM_USER0);
58 SetPageUptodate(page);
59 }
60
61 @@ -643,7 +641,8 @@ static struct nfs_page * nfs_update_request(struct nfs_open_context* ctx,
62 return ERR_PTR(error);
63 }
64 spin_unlock(&inode->i_lock);
65 - return new;
66 + req = new;
67 + goto zero_page;
68 }
69 spin_unlock(&inode->i_lock);
70
71 @@ -671,13 +670,23 @@ static struct nfs_page * nfs_update_request(struct nfs_open_context* ctx,
72 if (offset < req->wb_offset) {
73 req->wb_offset = offset;
74 req->wb_pgbase = offset;
75 - req->wb_bytes = rqend - req->wb_offset;
76 + req->wb_bytes = max(end, rqend) - req->wb_offset;
77 + goto zero_page;
78 }
79
80 if (end > rqend)
81 req->wb_bytes = end - req->wb_offset;
82
83 return req;
84 +zero_page:
85 + /* If this page might potentially be marked as up to date,
86 + * then we need to zero any uninitalised data. */
87 + if (req->wb_pgbase == 0 && req->wb_bytes != PAGE_CACHE_SIZE
88 + && !PageUptodate(req->wb_page))
89 + zero_user_page(req->wb_page, req->wb_bytes,
90 + PAGE_CACHE_SIZE - req->wb_bytes,
91 + KM_USER0);
92 + return req;
93 }
94
95 int nfs_flush_incompatible(struct file *file, struct page *page)
96 diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
97 index f37f25c..0b5e35f 100644
98 --- a/fs/ocfs2/aops.c
99 +++ b/fs/ocfs2/aops.c
100 @@ -661,6 +661,27 @@ static void ocfs2_clear_page_regions(struct page *page,
101 }
102
103 /*
104 + * Nonsparse file systems fully allocate before we get to the write
105 + * code. This prevents ocfs2_write() from tagging the write as an
106 + * allocating one, which means ocfs2_map_page_blocks() might try to
107 + * read-in the blocks at the tail of our file. Avoid reading them by
108 + * testing i_size against each block offset.
109 + */
110 +static int ocfs2_should_read_blk(struct inode *inode, struct page *page,
111 + unsigned int block_start)
112 +{
113 + u64 offset = page_offset(page) + block_start;
114 +
115 + if (ocfs2_sparse_alloc(OCFS2_SB(inode->i_sb)))
116 + return 1;
117 +
118 + if (i_size_read(inode) > offset)
119 + return 1;
120 +
121 + return 0;
122 +}
123 +
124 +/*
125 * Some of this taken from block_prepare_write(). We already have our
126 * mapping by now though, and the entire write will be allocating or
127 * it won't, so not much need to use BH_New.
128 @@ -713,6 +734,7 @@ int ocfs2_map_page_blocks(struct page *page, u64 *p_blkno,
129 set_buffer_uptodate(bh);
130 } else if (!buffer_uptodate(bh) && !buffer_delay(bh) &&
131 !buffer_new(bh) &&
132 + ocfs2_should_read_blk(inode, page, block_start) &&
133 (block_start < from || block_end > to)) {
134 ll_rw_block(READ, 1, &bh);
135 *wait_bh++=bh;