]> git.pld-linux.org Git - packages/kernel.git/blame - linux-2.4.18-hpfs.patch
- replaced by linux-2.4-sfq.patch
[packages/kernel.git] / linux-2.4.18-hpfs.patch
CommitLineData
6525e356 1diff -Nur linux-2.4.18-2.27/fs/hpfs/buffer.c linux-2.4.6/fs/hpfs/buffer.c
2--- linux-2.4.18-2.27/fs/hpfs/buffer.c Mon Feb 25 20:38:08 2002
3+++ linux-2.4.6/fs/hpfs/buffer.c Sat Dec 9 20:43:03 2000
4@@ -122,9 +122,12 @@
5 void *hpfs_map_sector(struct super_block *s, unsigned secno, struct buffer_head **bhp,
6 int ahead)
7 {
8+ kdev_t dev = s->s_dev;
9 struct buffer_head *bh;
10
11- *bhp = bh = sb_bread(s, secno);
12+ if (!ahead || secno + ahead >= s->s_hpfs_fs_size)
13+ *bhp = bh = bread(dev, secno, 512);
14+ else *bhp = bh = bread(dev, secno, 512);
15 if (bh != NULL)
16 return bh->b_data;
17 else {
18@@ -140,7 +143,7 @@
19 struct buffer_head *bh;
20 /*return hpfs_map_sector(s, secno, bhp, 0);*/
21
22- if ((*bhp = bh = sb_getblk(s, secno)) != NULL) {
23+ if ((*bhp = bh = getblk(s->s_dev, secno, 512)) != NULL) {
24 if (!buffer_uptodate(bh)) wait_on_buffer(bh);
25 mark_buffer_uptodate(bh, 1);
26 return bh->b_data;
27@@ -155,6 +158,7 @@
28 void *hpfs_map_4sectors(struct super_block *s, unsigned secno, struct quad_buffer_head *qbh,
29 int ahead)
30 {
31+ kdev_t dev = s->s_dev;
32 struct buffer_head *bh;
33 char *data;
34
35@@ -169,22 +173,24 @@
36 goto bail;
37 }
38
39- qbh->bh[0] = bh = sb_bread(s, secno);
40+ if (!ahead || secno + 4 + ahead > s->s_hpfs_fs_size)
41+ qbh->bh[0] = bh = bread(dev, secno, 512);
42+ else qbh->bh[0] = bh = bread(dev, secno, 512);
43 if (!bh)
44 goto bail0;
45 memcpy(data, bh->b_data, 512);
46
47- qbh->bh[1] = bh = sb_bread(s, secno + 1);
48+ qbh->bh[1] = bh = bread(dev, secno + 1, 512);
49 if (!bh)
50 goto bail1;
51 memcpy(data + 512, bh->b_data, 512);
52
53- qbh->bh[2] = bh = sb_bread(s, secno + 2);
54+ qbh->bh[2] = bh = bread(dev, secno + 2, 512);
55 if (!bh)
56 goto bail2;
57 memcpy(data + 2 * 512, bh->b_data, 512);
58
59- qbh->bh[3] = bh = sb_bread(s, secno + 3);
60+ qbh->bh[3] = bh = bread(dev, secno + 3, 512);
61 if (!bh)
62 goto bail3;
63 memcpy(data + 3 * 512, bh->b_data, 512);
64diff -Nur linux-2.4.18-2.27/fs/hpfs/file.c linux-2.4.6/fs/hpfs/file.c
65--- linux-2.4.18-2.27/fs/hpfs/file.c Mon Aug 13 02:37:53 2001
66+++ linux-2.4.6/fs/hpfs/file.c Fri Dec 29 23:07:57 2000
67@@ -11,8 +11,6 @@
68 #include <linux/smp_lock.h>
69 #include "hpfs_fn.h"
70
71-#define BLOCKS(size) (((size) + 511) >> 9)
72-
73 /* HUH? */
74 int hpfs_open(struct inode *i, struct file *f)
75 {
76@@ -48,7 +46,7 @@
77 unsigned n, disk_secno;
78 struct fnode *fnode;
79 struct buffer_head *bh;
80- if (BLOCKS(inode->u.hpfs_i.mmu_private) <= file_secno) return 0;
81+ if (((inode->i_size + 511) >> 9) <= file_secno) return 0;
82 n = file_secno - inode->i_hpfs_file_sec;
83 if (n < inode->i_hpfs_n_secs) return inode->i_hpfs_disk_sec + n;
84 if (!(fnode = hpfs_map_fnode(inode->i_sb, inode->i_ino, &bh))) return 0;
85diff -Nur linux-2.4.18-2.27/fs/hpfs/inode.c linux-2.4.6/fs/hpfs/inode.c
86--- linux-2.4.18-2.27/fs/hpfs/inode.c Mon Sep 10 16:31:25 2001
87+++ linux-2.4.6/fs/hpfs/inode.c Mon Jan 22 19:40:47 2001
88@@ -12,7 +12,6 @@
89
90 static struct file_operations hpfs_file_ops =
91 {
92- llseek: generic_file_llseek,
93 read: generic_file_read,
94 write: hpfs_file_write,
95 mmap: generic_file_mmap,
96@@ -300,12 +299,10 @@
97 {
98 struct inode *inode = dentry->d_inode;
99 int error;
100- if ((attr->ia_valid & ATTR_SIZE) && attr->ia_size > inode->i_size)
101- return -EINVAL;
102+ if ((attr->ia_valid & ATTR_SIZE) && attr->ia_size > inode->i_size) return -EINVAL;
103 if (inode->i_sb->s_hpfs_root == inode->i_ino) return -EINVAL;
104 if ((error = inode_change_ok(inode, attr))) return error;
105- error = inode_setattr(inode, attr);
106- if (error) return error;
107+ inode_setattr(inode, attr);
108 hpfs_write_inode(inode);
109 return 0;
110 }
111diff -Nur linux-2.4.18-2.27/fs/hpfs/super.c linux-2.4.6/fs/hpfs/super.c
112--- linux-2.4.18-2.27/fs/hpfs/super.c Mon Feb 25 20:38:08 2002
113+++ linux-2.4.6/fs/hpfs/super.c Tue Jun 12 04:15:27 2001
114@@ -3,7 +3,7 @@
115 *
116 * Mikulas Patocka (mikulas@artax.karlin.mff.cuni.cz), 1998-1999
117 *
118- * mounting, unmounting, error handling
119+ * mouning, unmounting, error handling
120 */
121
122 #include <linux/string.h>
This page took 0.21473 seconds and 4 git commands to generate.