aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext2/super.c6
-rw-r--r--fs/ext3/fsync.c9
-rw-r--r--fs/ext3/super.c3
-rw-r--r--fs/isofs/export.c1
-rw-r--r--fs/jbd/recovery.c7
-rw-r--r--fs/quota/dquot.c2
-rw-r--r--fs/quota/quota.c2
-rw-r--r--fs/udf/inode.c4
-rw-r--r--fs/udf/namei.c1
-rw-r--r--fs/udf/super.c130
-rw-r--r--fs/udf/truncate.c4
-rw-r--r--fs/udf/udfdecl.h1
12 files changed, 88 insertions, 82 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 5df3d2d8169c..9f311d27b16f 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -771,13 +771,13 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
771 err = -ENOMEM; 771 err = -ENOMEM;
772 sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); 772 sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
773 if (!sbi) 773 if (!sbi)
774 goto failed_unlock; 774 goto failed;
775 775
776 sbi->s_blockgroup_lock = 776 sbi->s_blockgroup_lock =
777 kzalloc(sizeof(struct blockgroup_lock), GFP_KERNEL); 777 kzalloc(sizeof(struct blockgroup_lock), GFP_KERNEL);
778 if (!sbi->s_blockgroup_lock) { 778 if (!sbi->s_blockgroup_lock) {
779 kfree(sbi); 779 kfree(sbi);
780 goto failed_unlock; 780 goto failed;
781 } 781 }
782 sb->s_fs_info = sbi; 782 sb->s_fs_info = sbi;
783 sbi->s_sb_block = sb_block; 783 sbi->s_sb_block = sb_block;
@@ -1130,7 +1130,7 @@ failed_sbi:
1130 sb->s_fs_info = NULL; 1130 sb->s_fs_info = NULL;
1131 kfree(sbi->s_blockgroup_lock); 1131 kfree(sbi->s_blockgroup_lock);
1132 kfree(sbi); 1132 kfree(sbi);
1133failed_unlock: 1133failed:
1134 return ret; 1134 return ret;
1135} 1135}
1136 1136
diff --git a/fs/ext3/fsync.c b/fs/ext3/fsync.c
index d4dff278cbd8..b31dbd4c46ad 100644
--- a/fs/ext3/fsync.c
+++ b/fs/ext3/fsync.c
@@ -92,8 +92,13 @@ int ext3_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
92 * disk caches manually so that data really is on persistent 92 * disk caches manually so that data really is on persistent
93 * storage 93 * storage
94 */ 94 */
95 if (needs_barrier) 95 if (needs_barrier) {
96 blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL); 96 int err;
97
98 err = blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL);
99 if (!ret)
100 ret = err;
101 }
97out: 102out:
98 trace_ext3_sync_file_exit(inode, ret); 103 trace_ext3_sync_file_exit(inode, ret);
99 return ret; 104 return ret;
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 4ac304c55c53..ff9bcdc5b0d5 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -2058,7 +2058,8 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
2058 goto failed_mount3; 2058 goto failed_mount3;
2059 } 2059 }
2060 2060
2061 ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY); 2061 if (ext3_setup_super(sb, es, sb->s_flags & MS_RDONLY))
2062 sb->s_flags |= MS_RDONLY;
2062 2063
2063 EXT3_SB(sb)->s_mount_state |= EXT3_ORPHAN_FS; 2064 EXT3_SB(sb)->s_mount_state |= EXT3_ORPHAN_FS;
2064 ext3_orphan_cleanup(sb, es); 2065 ext3_orphan_cleanup(sb, es);
diff --git a/fs/isofs/export.c b/fs/isofs/export.c
index aa4356d09eee..1d3804492aa7 100644
--- a/fs/isofs/export.c
+++ b/fs/isofs/export.c
@@ -134,6 +134,7 @@ isofs_export_encode_fh(struct inode *inode,
134 len = 3; 134 len = 3;
135 fh32[0] = ei->i_iget5_block; 135 fh32[0] = ei->i_iget5_block;
136 fh16[2] = (__u16)ei->i_iget5_offset; /* fh16 [sic] */ 136 fh16[2] = (__u16)ei->i_iget5_offset; /* fh16 [sic] */
137 fh16[3] = 0; /* avoid leaking uninitialized data */
137 fh32[2] = inode->i_generation; 138 fh32[2] = inode->i_generation;
138 if (parent) { 139 if (parent) {
139 struct iso_inode_info *eparent; 140 struct iso_inode_info *eparent;
diff --git a/fs/jbd/recovery.c b/fs/jbd/recovery.c
index 008bf062fd26..a748fe21465a 100644
--- a/fs/jbd/recovery.c
+++ b/fs/jbd/recovery.c
@@ -265,8 +265,11 @@ int journal_recover(journal_t *journal)
265 if (!err) 265 if (!err)
266 err = err2; 266 err = err2;
267 /* Flush disk caches to get replayed data on the permanent storage */ 267 /* Flush disk caches to get replayed data on the permanent storage */
268 if (journal->j_flags & JFS_BARRIER) 268 if (journal->j_flags & JFS_BARRIER) {
269 blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL); 269 err2 = blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL);
270 if (!err)
271 err = err2;
272 }
270 273
271 return err; 274 return err;
272} 275}
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index d679fc48ef27..36a29b753c79 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -78,7 +78,7 @@
78#include <linux/quotaops.h> 78#include <linux/quotaops.h>
79#include "../internal.h" /* ugh */ 79#include "../internal.h" /* ugh */
80 80
81#include <asm/uaccess.h> 81#include <linux/uaccess.h>
82 82
83/* 83/*
84 * There are three quota SMP locks. dq_list_lock protects all lists with quotas 84 * There are three quota SMP locks. dq_list_lock protects all lists with quotas
diff --git a/fs/quota/quota.c b/fs/quota/quota.c
index c659f92298d3..6f155788cbc6 100644
--- a/fs/quota/quota.c
+++ b/fs/quota/quota.c
@@ -9,7 +9,7 @@
9#include <linux/namei.h> 9#include <linux/namei.h>
10#include <linux/slab.h> 10#include <linux/slab.h>
11#include <asm/current.h> 11#include <asm/current.h>
12#include <asm/uaccess.h> 12#include <linux/uaccess.h>
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/security.h> 14#include <linux/security.h>
15#include <linux/syscalls.h> 15#include <linux/syscalls.h>
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 873e1bab9c4c..fafaad795cd6 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -1247,7 +1247,6 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
1247{ 1247{
1248 struct fileEntry *fe; 1248 struct fileEntry *fe;
1249 struct extendedFileEntry *efe; 1249 struct extendedFileEntry *efe;
1250 int offset;
1251 struct udf_sb_info *sbi = UDF_SB(inode->i_sb); 1250 struct udf_sb_info *sbi = UDF_SB(inode->i_sb);
1252 struct udf_inode_info *iinfo = UDF_I(inode); 1251 struct udf_inode_info *iinfo = UDF_I(inode);
1253 unsigned int link_count; 1252 unsigned int link_count;
@@ -1359,7 +1358,6 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
1359 iinfo->i_lenEAttr = le32_to_cpu(fe->lengthExtendedAttr); 1358 iinfo->i_lenEAttr = le32_to_cpu(fe->lengthExtendedAttr);
1360 iinfo->i_lenAlloc = le32_to_cpu(fe->lengthAllocDescs); 1359 iinfo->i_lenAlloc = le32_to_cpu(fe->lengthAllocDescs);
1361 iinfo->i_checkpoint = le32_to_cpu(fe->checkpoint); 1360 iinfo->i_checkpoint = le32_to_cpu(fe->checkpoint);
1362 offset = sizeof(struct fileEntry) + iinfo->i_lenEAttr;
1363 } else { 1361 } else {
1364 inode->i_blocks = le64_to_cpu(efe->logicalBlocksRecorded) << 1362 inode->i_blocks = le64_to_cpu(efe->logicalBlocksRecorded) <<
1365 (inode->i_sb->s_blocksize_bits - 9); 1363 (inode->i_sb->s_blocksize_bits - 9);
@@ -1381,8 +1379,6 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
1381 iinfo->i_lenEAttr = le32_to_cpu(efe->lengthExtendedAttr); 1379 iinfo->i_lenEAttr = le32_to_cpu(efe->lengthExtendedAttr);
1382 iinfo->i_lenAlloc = le32_to_cpu(efe->lengthAllocDescs); 1380 iinfo->i_lenAlloc = le32_to_cpu(efe->lengthAllocDescs);
1383 iinfo->i_checkpoint = le32_to_cpu(efe->checkpoint); 1381 iinfo->i_checkpoint = le32_to_cpu(efe->checkpoint);
1384 offset = sizeof(struct extendedFileEntry) +
1385 iinfo->i_lenEAttr;
1386 } 1382 }
1387 1383
1388 switch (fe->icbTag.fileType) { 1384 switch (fe->icbTag.fileType) {
diff --git a/fs/udf/namei.c b/fs/udf/namei.c
index 544b2799a911..95fee278ab9d 100644
--- a/fs/udf/namei.c
+++ b/fs/udf/namei.c
@@ -1279,6 +1279,7 @@ static int udf_encode_fh(struct inode *inode, __u32 *fh, int *lenp,
1279 *lenp = 3; 1279 *lenp = 3;
1280 fid->udf.block = location.logicalBlockNum; 1280 fid->udf.block = location.logicalBlockNum;
1281 fid->udf.partref = location.partitionReferenceNum; 1281 fid->udf.partref = location.partitionReferenceNum;
1282 fid->udf.parent_partref = 0;
1282 fid->udf.generation = inode->i_generation; 1283 fid->udf.generation = inode->i_generation;
1283 1284
1284 if (parent) { 1285 if (parent) {
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 8d86a8706c0e..dcbf98722afc 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -252,6 +252,63 @@ static int udf_sb_alloc_partition_maps(struct super_block *sb, u32 count)
252 return 0; 252 return 0;
253} 253}
254 254
255static void udf_sb_free_bitmap(struct udf_bitmap *bitmap)
256{
257 int i;
258 int nr_groups = bitmap->s_nr_groups;
259 int size = sizeof(struct udf_bitmap) + (sizeof(struct buffer_head *) *
260 nr_groups);
261
262 for (i = 0; i < nr_groups; i++)
263 if (bitmap->s_block_bitmap[i])
264 brelse(bitmap->s_block_bitmap[i]);
265
266 if (size <= PAGE_SIZE)