diff options
Diffstat (limited to 'fs/reiserfs')
-rw-r--r-- | fs/reiserfs/dir.c | 1 | ||||
-rw-r--r-- | fs/reiserfs/fix_node.c | 1 | ||||
-rw-r--r-- | fs/reiserfs/inode.c | 1 | ||||
-rw-r--r-- | fs/reiserfs/journal.c | 16 | ||||
-rw-r--r-- | fs/reiserfs/namei.c | 1 | ||||
-rw-r--r-- | fs/reiserfs/super.c | 11 | ||||
-rw-r--r-- | fs/reiserfs/xattr.c | 1 | ||||
-rw-r--r-- | fs/reiserfs/xattr_acl.c | 1 | ||||
-rw-r--r-- | fs/reiserfs/xattr_security.c | 3 |
9 files changed, 23 insertions, 13 deletions
diff --git a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c index c094f58c744..f8a6075abf5 100644 --- a/fs/reiserfs/dir.c +++ b/fs/reiserfs/dir.c @@ -8,6 +8,7 @@ #include <linux/reiserfs_fs.h> #include <linux/stat.h> #include <linux/buffer_head.h> +#include <linux/slab.h> #include <asm/uaccess.h> extern const struct reiserfs_key MIN_KEY; diff --git a/fs/reiserfs/fix_node.c b/fs/reiserfs/fix_node.c index 6591cb21edf..1e4250bc3a6 100644 --- a/fs/reiserfs/fix_node.c +++ b/fs/reiserfs/fix_node.c @@ -35,6 +35,7 @@ **/ #include <linux/time.h> +#include <linux/slab.h> #include <linux/string.h> #include <linux/reiserfs_fs.h> #include <linux/buffer_head.h> diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index d1da94b82d8..dc2c65e0485 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c @@ -11,6 +11,7 @@ #include <linux/smp_lock.h> #include <linux/pagemap.h> #include <linux/highmem.h> +#include <linux/slab.h> #include <asm/uaccess.h> #include <asm/unaligned.h> #include <linux/buffer_head.h> diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index ba98546fabb..19fbc810e8e 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c @@ -50,6 +50,7 @@ #include <linux/blkdev.h> #include <linux/backing-dev.h> #include <linux/uaccess.h> +#include <linux/slab.h> #include <asm/system.h> @@ -2217,6 +2218,15 @@ static int journal_read_transaction(struct super_block *sb, brelse(d_bh); return 1; } + + if (bdev_read_only(sb->s_bdev)) { + reiserfs_warning(sb, "clm-2076", + "device is readonly, unable to replay log"); + brelse(c_bh); + brelse(d_bh); + return -EROFS; + } + trans_id = get_desc_trans_id(desc); /* now we know we've got a good transaction, and it was inside the valid time ranges */ log_blocks = kmalloc(get_desc_trans_len(desc) * @@ -2459,12 +2469,6 @@ static int journal_read(struct super_block *sb) goto start_log_replay; } - if (continue_replay && bdev_read_only(sb->s_bdev)) { - reiserfs_warning(sb, "clm-2076", - "device is readonly, unable to replay log"); - return -1; - } - /* ok, there are transactions that need to be replayed. start with the first log block, find ** all the valid transactions, and pick out the oldest. */ diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c index 96e4cbbfaa1..d0c43cb99ff 100644 --- a/fs/reiserfs/namei.c +++ b/fs/reiserfs/namei.c @@ -13,6 +13,7 @@ #include <linux/time.h> #include <linux/bitops.h> +#include <linux/slab.h> #include <linux/reiserfs_fs.h> #include <linux/reiserfs_acl.h> #include <linux/reiserfs_xattr.h> diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 04bf5d791bd..59125fb36d4 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c @@ -12,6 +12,7 @@ */ #include <linux/module.h> +#include <linux/slab.h> #include <linux/vmalloc.h> #include <linux/time.h> #include <asm/uaccess.h> @@ -1618,10 +1619,8 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) save_mount_options(s, data); sbi = kzalloc(sizeof(struct reiserfs_sb_info), GFP_KERNEL); - if (!sbi) { - errval = -ENOMEM; - goto error_alloc; - } + if (!sbi) + return -ENOMEM; s->s_fs_info = sbi; /* Set default values for options: non-aggressive tails, RO on errors */ REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_SMALLTAIL); @@ -1878,12 +1877,12 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) return (0); error: - reiserfs_write_unlock(s); -error_alloc: if (jinit_done) { /* kill the commit thread, free journal ram */ journal_release_error(NULL, s); } + reiserfs_write_unlock(s); + reiserfs_free_bitmap_cache(s); if (SB_BUFFER_WITH_SB(s)) brelse(SB_BUFFER_WITH_SB(s)); diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index 37d034ca7d9..4f9586bb763 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c @@ -38,6 +38,7 @@ #include <linux/dcache.h> #include <linux/namei.h> #include <linux/errno.h> +#include <linux/gfp.h> #include <linux/fs.h> #include <linux/file.h> #include <linux/pagemap.h> diff --git a/fs/reiserfs/xattr_acl.c b/fs/reiserfs/xattr_acl.c index dd20a7883f0..9cdb759645a 100644 --- a/fs/reiserfs/xattr_acl.c +++ b/fs/reiserfs/xattr_acl.c @@ -5,6 +5,7 @@ #include <linux/errno.h> #include <linux/pagemap.h> #include <linux/xattr.h> +#include <linux/slab.h> #include <linux/posix_acl_xattr.h> #include <linux/reiserfs_xattr.h> #include <linux/reiserfs_acl.h> diff --git a/fs/reiserfs/xattr_security.c b/fs/reiserfs/xattr_security.c index d8b5bfcbdd3..7271a477c04 100644 --- a/fs/reiserfs/xattr_security.c +++ b/fs/reiserfs/xattr_security.c @@ -3,6 +3,7 @@ #include <linux/fs.h> #include <linux/pagemap.h> #include <linux/xattr.h> +#include <linux/slab.h> #include <linux/reiserfs_xattr.h> #include <linux/security.h> #include <asm/uaccess.h> @@ -76,7 +77,7 @@ int reiserfs_security_init(struct inode *dir, struct inode *inode, return error; } - if (sec->length) { + if (sec->length && reiserfs_xattrs_initialized(inode->i_sb)) { blocks = reiserfs_xattr_jcreate_nblocks(inode) + reiserfs_xattr_nblocks(inode, sec->length); /* We don't want to count the directories twice if we have |