diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-07-04 09:14:42 -0400 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-07-04 09:14:42 -0400 |
commit | 07929dcb963786512c760dd3ecd148d89295e7e5 (patch) | |
tree | f5db01392ebb968b4c8acb5a6b3b03a833bfcb02 /fs | |
parent | c2d9b8387bce8b4a0fd402fab7dc1319d11a418d (diff) | |
parent | 19f7241a3b087bbf4dd107c979608fdb56c83a09 (diff) |
Automatic merge with /usr/src/ntfs-2.6.git.
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fat/cache.c | 2 | ||||
-rw-r--r-- | fs/fat/inode.c | 21 | ||||
-rw-r--r-- | fs/freevxfs/vxfs.h | 1 | ||||
-rw-r--r-- | fs/freevxfs/vxfs_bmap.c | 2 | ||||
-rw-r--r-- | fs/freevxfs/vxfs_fshead.c | 11 | ||||
-rw-r--r-- | fs/freevxfs/vxfs_kcompat.h | 49 | ||||
-rw-r--r-- | fs/freevxfs/vxfs_lookup.c | 8 | ||||
-rw-r--r-- | fs/freevxfs/vxfs_olt.c | 10 | ||||
-rw-r--r-- | fs/freevxfs/vxfs_subr.c | 1 | ||||
-rw-r--r-- | fs/freevxfs/vxfs_super.c | 7 | ||||
-rw-r--r-- | fs/reiserfs/super.c | 3 | ||||
-rw-r--r-- | fs/udf/namei.c | 4 |
12 files changed, 36 insertions, 83 deletions
diff --git a/fs/fat/cache.c b/fs/fat/cache.c index 7c52e465a619..77c24fcf712a 100644 --- a/fs/fat/cache.c +++ b/fs/fat/cache.c | |||
@@ -56,7 +56,7 @@ int __init fat_cache_init(void) | |||
56 | return 0; | 56 | return 0; |
57 | } | 57 | } |
58 | 58 | ||
59 | void __exit fat_cache_destroy(void) | 59 | void fat_cache_destroy(void) |
60 | { | 60 | { |
61 | if (kmem_cache_destroy(fat_cache_cachep)) | 61 | if (kmem_cache_destroy(fat_cache_cachep)) |
62 | printk(KERN_INFO "fat_cache: not all structures were freed\n"); | 62 | printk(KERN_INFO "fat_cache: not all structures were freed\n"); |
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 8ccee8415488..96ae85b67eba 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c | |||
@@ -1327,16 +1327,25 @@ out_fail: | |||
1327 | EXPORT_SYMBOL(fat_fill_super); | 1327 | EXPORT_SYMBOL(fat_fill_super); |
1328 | 1328 | ||
1329 | int __init fat_cache_init(void); | 1329 | int __init fat_cache_init(void); |
1330 | void __exit fat_cache_destroy(void); | 1330 | void fat_cache_destroy(void); |
1331 | 1331 | ||
1332 | static int __init init_fat_fs(void) | 1332 | static int __init init_fat_fs(void) |
1333 | { | 1333 | { |
1334 | int ret; | 1334 | int err; |
1335 | 1335 | ||
1336 | ret = fat_cache_init(); | 1336 | err = fat_cache_init(); |
1337 | if (ret < 0) | 1337 | if (err) |
1338 | return ret; | 1338 | return err; |
1339 | return fat_init_inodecache(); | 1339 | |
1340 | err = fat_init_inodecache(); | ||
1341 | if (err) | ||
1342 | goto failed; | ||
1343 | |||
1344 | return 0; | ||
1345 | |||
1346 | failed: | ||
1347 | fat_cache_destroy(); | ||
1348 | return err; | ||
1340 | } | 1349 | } |
1341 | 1350 | ||
1342 | static void __exit exit_fat_fs(void) | 1351 | static void __exit exit_fat_fs(void) |
diff --git a/fs/freevxfs/vxfs.h b/fs/freevxfs/vxfs.h index 8da0252642a4..583bd78086d8 100644 --- a/fs/freevxfs/vxfs.h +++ b/fs/freevxfs/vxfs.h | |||
@@ -37,7 +37,6 @@ | |||
37 | * superblocks of the Veritas Filesystem. | 37 | * superblocks of the Veritas Filesystem. |
38 | */ | 38 | */ |
39 | #include <linux/types.h> | 39 | #include <linux/types.h> |
40 | #include "vxfs_kcompat.h" | ||
41 | 40 | ||
42 | 41 | ||
43 | /* | 42 | /* |
diff --git a/fs/freevxfs/vxfs_bmap.c b/fs/freevxfs/vxfs_bmap.c index bc4b57da306a..d3f6b2835bc8 100644 --- a/fs/freevxfs/vxfs_bmap.c +++ b/fs/freevxfs/vxfs_bmap.c | |||
@@ -101,7 +101,7 @@ vxfs_bmap_ext4(struct inode *ip, long bn) | |||
101 | return 0; | 101 | return 0; |
102 | 102 | ||
103 | fail_size: | 103 | fail_size: |
104 | printk("vxfs: indirect extent to big!\n"); | 104 | printk("vxfs: indirect extent too big!\n"); |
105 | fail_buf: | 105 | fail_buf: |
106 | return 0; | 106 | return 0; |
107 | } | 107 | } |
diff --git a/fs/freevxfs/vxfs_fshead.c b/fs/freevxfs/vxfs_fshead.c index 05b19f70bf97..6dee109aeea4 100644 --- a/fs/freevxfs/vxfs_fshead.c +++ b/fs/freevxfs/vxfs_fshead.c | |||
@@ -78,17 +78,18 @@ vxfs_getfsh(struct inode *ip, int which) | |||
78 | struct buffer_head *bp; | 78 | struct buffer_head *bp; |
79 | 79 | ||
80 | bp = vxfs_bread(ip, which); | 80 | bp = vxfs_bread(ip, which); |
81 | if (buffer_mapped(bp)) { | 81 | if (bp) { |
82 | struct vxfs_fsh *fhp; | 82 | struct vxfs_fsh *fhp; |
83 | 83 | ||
84 | if (!(fhp = kmalloc(sizeof(*fhp), SLAB_KERNEL))) | 84 | if (!(fhp = kmalloc(sizeof(*fhp), GFP_KERNEL))) |
85 | return NULL; | 85 | goto out; |
86 | memcpy(fhp, bp->b_data, sizeof(*fhp)); | 86 | memcpy(fhp, bp->b_data, sizeof(*fhp)); |
87 | 87 | ||
88 | brelse(bp); | 88 | put_bh(bp); |
89 | return (fhp); | 89 | return (fhp); |
90 | } | 90 | } |
91 | 91 | out: | |
92 | brelse(bp); | ||
92 | return NULL; | 93 | return NULL; |
93 | } | 94 | } |
94 | 95 | ||
diff --git a/fs/freevxfs/vxfs_kcompat.h b/fs/freevxfs/vxfs_kcompat.h deleted file mode 100644 index 342a4cc860f4..000000000000 --- a/fs/freevxfs/vxfs_kcompat.h +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | #ifndef _VXFS_KCOMPAT_H | ||
2 | #define _VXFS_KCOMPAT_H | ||
3 | |||
4 | #include <linux/version.h> | ||
5 | |||
6 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) | ||
7 | |||
8 | #include <linux/blkdev.h> | ||
9 | |||
10 | typedef long sector_t; | ||
11 | |||
12 | /* From include/linux/fs.h (Linux 2.5.2-pre3) */ | ||
13 | static inline struct buffer_head * sb_bread(struct super_block *sb, int block) | ||
14 | { | ||
15 | return bread(sb->s_dev, block, sb->s_blocksize); | ||
16 | } | ||
17 | |||
18 | /* Dito. */ | ||
19 | static inline void map_bh(struct buffer_head *bh, struct super_block *sb, int block) | ||
20 | { | ||
21 | bh->b_state |= 1 << BH_Mapped; | ||
22 | bh->b_dev = sb->s_dev; | ||
23 | bh->b_blocknr = block; | ||
24 | } | ||
25 | |||
26 | /* From fs/block_dev.c (Linux 2.5.2-pre2) */ | ||
27 | static inline int sb_set_blocksize(struct super_block *sb, int size) | ||
28 | { | ||
29 | int bits; | ||
30 | if (set_blocksize(sb->s_dev, size) < 0) | ||
31 | return 0; | ||
32 | sb->s_blocksize = size; | ||
33 | for (bits = 9, size >>= 9; size >>= 1; bits++) | ||
34 | ; | ||
35 | sb->s_blocksize_bits = bits; | ||
36 | return sb->s_blocksize; | ||
37 | } | ||
38 | |||
39 | /* Dito. */ | ||
40 | static inline int sb_min_blocksize(struct super_block *sb, int size) | ||
41 | { | ||
42 | int minsize = get_hardsect_size(sb->s_dev); | ||
43 | if (size < minsize) | ||
44 | size = minsize; | ||
45 | return sb_set_blocksize(sb, size); | ||
46 | } | ||
47 | |||
48 | #endif /* Kernel 2.4 */ | ||
49 | #endif /* _VXFS_KCOMPAT_H */ | ||
diff --git a/fs/freevxfs/vxfs_lookup.c b/fs/freevxfs/vxfs_lookup.c index 506ae251d2c0..554eb455722c 100644 --- a/fs/freevxfs/vxfs_lookup.c +++ b/fs/freevxfs/vxfs_lookup.c | |||
@@ -61,13 +61,13 @@ struct file_operations vxfs_dir_operations = { | |||
61 | }; | 61 | }; |
62 | 62 | ||
63 | 63 | ||
64 | static __inline__ u_long | 64 | static inline u_long |
65 | dir_pages(struct inode *inode) | 65 | dir_pages(struct inode *inode) |
66 | { | 66 | { |
67 | return (inode->i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; | 67 | return (inode->i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; |
68 | } | 68 | } |
69 | 69 | ||
70 | static __inline__ u_long | 70 | static inline u_long |
71 | dir_blocks(struct inode *ip) | 71 | dir_blocks(struct inode *ip) |
72 | { | 72 | { |
73 | u_long bsize = ip->i_sb->s_blocksize; | 73 | u_long bsize = ip->i_sb->s_blocksize; |
@@ -79,7 +79,7 @@ dir_blocks(struct inode *ip) | |||
79 | * | 79 | * |
80 | * len <= VXFS_NAMELEN and de != NULL are guaranteed by caller. | 80 | * len <= VXFS_NAMELEN and de != NULL are guaranteed by caller. |
81 | */ | 81 | */ |
82 | static __inline__ int | 82 | static inline int |
83 | vxfs_match(int len, const char * const name, struct vxfs_direct *de) | 83 | vxfs_match(int len, const char * const name, struct vxfs_direct *de) |
84 | { | 84 | { |
85 | if (len != de->d_namelen) | 85 | if (len != de->d_namelen) |
@@ -89,7 +89,7 @@ vxfs_match(int len, const char * const name, struct vxfs_direct *de) | |||
89 | return !memcmp(name, de->d_name, len); | 89 | return !memcmp(name, de->d_name, len); |
90 | } | 90 | } |
91 | 91 | ||
92 | static __inline__ struct vxfs_direct * | 92 | static inline struct vxfs_direct * |
93 | vxfs_next_entry(struct vxfs_direct *de) | 93 | vxfs_next_entry(struct vxfs_direct *de) |
94 | { | 94 | { |
95 | return ((struct vxfs_direct *)((char*)de + de->d_reclen)); | 95 | return ((struct vxfs_direct *)((char*)de + de->d_reclen)); |
diff --git a/fs/freevxfs/vxfs_olt.c b/fs/freevxfs/vxfs_olt.c index 7a204e31aad9..133476201d84 100644 --- a/fs/freevxfs/vxfs_olt.c +++ b/fs/freevxfs/vxfs_olt.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include "vxfs_olt.h" | 38 | #include "vxfs_olt.h" |
39 | 39 | ||
40 | 40 | ||
41 | static __inline__ void | 41 | static inline void |
42 | vxfs_get_fshead(struct vxfs_oltfshead *fshp, struct vxfs_sb_info *infp) | 42 | vxfs_get_fshead(struct vxfs_oltfshead *fshp, struct vxfs_sb_info *infp) |
43 | { | 43 | { |
44 | if (infp->vsi_fshino) | 44 | if (infp->vsi_fshino) |
@@ -46,7 +46,7 @@ vxfs_get_fshead(struct vxfs_oltfshead *fshp, struct vxfs_sb_info *infp) | |||
46 | infp->vsi_fshino = fshp->olt_fsino[0]; | 46 | infp->vsi_fshino = fshp->olt_fsino[0]; |
47 | } | 47 | } |
48 | 48 | ||
49 | static __inline__ void | 49 | static inline void |
50 | vxfs_get_ilist(struct vxfs_oltilist *ilistp, struct vxfs_sb_info *infp) | 50 | vxfs_get_ilist(struct vxfs_oltilist *ilistp, struct vxfs_sb_info *infp) |
51 | { | 51 | { |
52 | if (infp->vsi_iext) | 52 | if (infp->vsi_iext) |
@@ -54,7 +54,7 @@ vxfs_get_ilist(struct vxfs_oltilist *ilistp, struct vxfs_sb_info *infp) | |||
54 | infp->vsi_iext = ilistp->olt_iext[0]; | 54 | infp->vsi_iext = ilistp->olt_iext[0]; |
55 | } | 55 | } |
56 | 56 | ||
57 | static __inline__ u_long | 57 | static inline u_long |
58 | vxfs_oblock(struct super_block *sbp, daddr_t block, u_long bsize) | 58 | vxfs_oblock(struct super_block *sbp, daddr_t block, u_long bsize) |
59 | { | 59 | { |
60 | if (sbp->s_blocksize % bsize) | 60 | if (sbp->s_blocksize % bsize) |
@@ -104,8 +104,8 @@ vxfs_read_olt(struct super_block *sbp, u_long bsize) | |||
104 | goto fail; | 104 | goto fail; |
105 | } | 105 | } |
106 | 106 | ||
107 | oaddr = (char *)bp->b_data + op->olt_size; | 107 | oaddr = bp->b_data + op->olt_size; |
108 | eaddr = (char *)bp->b_data + (infp->vsi_oltsize * sbp->s_blocksize); | 108 | eaddr = bp->b_data + (infp->vsi_oltsize * sbp->s_blocksize); |
109 | 109 | ||
110 | while (oaddr < eaddr) { | 110 | while (oaddr < eaddr) { |
111 | struct vxfs_oltcommon *ocp = | 111 | struct vxfs_oltcommon *ocp = |
diff --git a/fs/freevxfs/vxfs_subr.c b/fs/freevxfs/vxfs_subr.c index 5e305612054a..50aae77651b2 100644 --- a/fs/freevxfs/vxfs_subr.c +++ b/fs/freevxfs/vxfs_subr.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
37 | #include <linux/pagemap.h> | 37 | #include <linux/pagemap.h> |
38 | 38 | ||
39 | #include "vxfs_kcompat.h" | ||
40 | #include "vxfs_extern.h" | 39 | #include "vxfs_extern.h" |
41 | 40 | ||
42 | 41 | ||
diff --git a/fs/freevxfs/vxfs_super.c b/fs/freevxfs/vxfs_super.c index 0ae2c7b8182a..27f66d3e8a04 100644 --- a/fs/freevxfs/vxfs_super.c +++ b/fs/freevxfs/vxfs_super.c | |||
@@ -155,12 +155,11 @@ static int vxfs_fill_super(struct super_block *sbp, void *dp, int silent) | |||
155 | 155 | ||
156 | sbp->s_flags |= MS_RDONLY; | 156 | sbp->s_flags |= MS_RDONLY; |
157 | 157 | ||
158 | infp = kmalloc(sizeof(*infp), GFP_KERNEL); | 158 | infp = kcalloc(1, sizeof(*infp), GFP_KERNEL); |
159 | if (!infp) { | 159 | if (!infp) { |
160 | printk(KERN_WARNING "vxfs: unable to allocate incore superblock\n"); | 160 | printk(KERN_WARNING "vxfs: unable to allocate incore superblock\n"); |
161 | return -ENOMEM; | 161 | return -ENOMEM; |
162 | } | 162 | } |
163 | memset(infp, 0, sizeof(*infp)); | ||
164 | 163 | ||
165 | bsize = sb_min_blocksize(sbp, BLOCK_SIZE); | 164 | bsize = sb_min_blocksize(sbp, BLOCK_SIZE); |
166 | if (!bsize) { | 165 | if (!bsize) { |
@@ -196,7 +195,7 @@ static int vxfs_fill_super(struct super_block *sbp, void *dp, int silent) | |||
196 | #endif | 195 | #endif |
197 | 196 | ||
198 | sbp->s_magic = rsbp->vs_magic; | 197 | sbp->s_magic = rsbp->vs_magic; |
199 | sbp->s_fs_info = (void *)infp; | 198 | sbp->s_fs_info = infp; |
200 | 199 | ||
201 | infp->vsi_raw = rsbp; | 200 | infp->vsi_raw = rsbp; |
202 | infp->vsi_bp = bp; | 201 | infp->vsi_bp = bp; |
@@ -263,7 +262,7 @@ vxfs_init(void) | |||
263 | sizeof(struct vxfs_inode_info), 0, | 262 | sizeof(struct vxfs_inode_info), 0, |
264 | SLAB_RECLAIM_ACCOUNT, NULL, NULL); | 263 | SLAB_RECLAIM_ACCOUNT, NULL, NULL); |
265 | if (vxfs_inode_cachep) | 264 | if (vxfs_inode_cachep) |
266 | return (register_filesystem(&vxfs_fs_type)); | 265 | return register_filesystem(&vxfs_fs_type); |
267 | return -ENOMEM; | 266 | return -ENOMEM; |
268 | } | 267 | } |
269 | 268 | ||
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index d50a5cd860ce..4b80ab95d338 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -1053,10 +1053,9 @@ static void handle_barrier_mode(struct super_block *s, unsigned long bits) { | |||
1053 | 1053 | ||
1054 | static void handle_attrs( struct super_block *s ) | 1054 | static void handle_attrs( struct super_block *s ) |
1055 | { | 1055 | { |
1056 | struct reiserfs_super_block * rs; | 1056 | struct reiserfs_super_block * rs = SB_DISK_SUPER_BLOCK (s); |
1057 | 1057 | ||
1058 | if( reiserfs_attrs( s ) ) { | 1058 | if( reiserfs_attrs( s ) ) { |
1059 | rs = SB_DISK_SUPER_BLOCK (s); | ||
1060 | if( old_format_only(s) ) { | 1059 | if( old_format_only(s) ) { |
1061 | reiserfs_warning(s, "reiserfs: cannot support attributes on 3.5.x disk format" ); | 1060 | reiserfs_warning(s, "reiserfs: cannot support attributes on 3.5.x disk format" ); |
1062 | REISERFS_SB(s) -> s_mount_opt &= ~ ( 1 << REISERFS_ATTRS ); | 1061 | REISERFS_SB(s) -> s_mount_opt &= ~ ( 1 << REISERFS_ATTRS ); |
diff --git a/fs/udf/namei.c b/fs/udf/namei.c index 4673157b262f..ac191ed7df0a 100644 --- a/fs/udf/namei.c +++ b/fs/udf/namei.c | |||
@@ -164,11 +164,7 @@ udf_find_entry(struct inode *dir, struct dentry *dentry, | |||
164 | uint32_t extoffset, elen, offset; | 164 | uint32_t extoffset, elen, offset; |
165 | struct buffer_head *bh = NULL; | 165 | struct buffer_head *bh = NULL; |
166 | 166 | ||
167 | if (!dir) | ||
168 | return NULL; | ||
169 | |||
170 | size = (udf_ext0_offset(dir) + dir->i_size) >> 2; | 167 | size = (udf_ext0_offset(dir) + dir->i_size) >> 2; |
171 | |||
172 | f_pos = (udf_ext0_offset(dir) >> 2); | 168 | f_pos = (udf_ext0_offset(dir) >> 2); |
173 | 169 | ||
174 | fibh->soffset = fibh->eoffset = (f_pos & ((dir->i_sb->s_blocksize - 1) >> 2)) << 2; | 170 | fibh->soffset = fibh->eoffset = (f_pos & ((dir->i_sb->s_blocksize - 1) >> 2)) << 2; |