diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2010-05-04 11:27:05 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2010-05-04 11:29:05 -0400 |
commit | 5306293c9cd2caf41849cc909281bda628bb989e (patch) | |
tree | 3be4e8231e2772c8a43ddbef5c6a72c20b3054bb /fs/reiserfs | |
parent | dbd65a7e44fff4741a0b2c84bd6bace85d22c242 (diff) | |
parent | 66f41d4c5c8a5deed66fdcc84509376c9a0bf9d8 (diff) |
Merge commit 'v2.6.34-rc6'
Conflicts:
fs/nfsd/nfs4callback.c
Diffstat (limited to 'fs/reiserfs')
-rw-r--r-- | fs/reiserfs/bitmap.c | 2 | ||||
-rw-r--r-- | fs/reiserfs/dir.c | 3 | ||||
-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 | 20 | ||||
-rw-r--r-- | fs/reiserfs/xattr_acl.c | 1 | ||||
-rw-r--r-- | fs/reiserfs/xattr_security.c | 3 |
10 files changed, 29 insertions, 30 deletions
diff --git a/fs/reiserfs/bitmap.c b/fs/reiserfs/bitmap.c index dc014f7def05..483442e66ed6 100644 --- a/fs/reiserfs/bitmap.c +++ b/fs/reiserfs/bitmap.c | |||
@@ -169,7 +169,7 @@ static int scan_bitmap_block(struct reiserfs_transaction_handle *th, | |||
169 | return 0; // No free blocks in this bitmap | 169 | return 0; // No free blocks in this bitmap |
170 | } | 170 | } |
171 | 171 | ||
172 | /* search for a first zero bit -- beggining of a window */ | 172 | /* search for a first zero bit -- beginning of a window */ |
173 | *beg = reiserfs_find_next_zero_le_bit | 173 | *beg = reiserfs_find_next_zero_le_bit |
174 | ((unsigned long *)(bh->b_data), boundary, *beg); | 174 | ((unsigned long *)(bh->b_data), boundary, *beg); |
175 | 175 | ||
diff --git a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c index c094f58c7448..07930449a958 100644 --- a/fs/reiserfs/dir.c +++ b/fs/reiserfs/dir.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/reiserfs_fs.h> | 8 | #include <linux/reiserfs_fs.h> |
9 | #include <linux/stat.h> | 9 | #include <linux/stat.h> |
10 | #include <linux/buffer_head.h> | 10 | #include <linux/buffer_head.h> |
11 | #include <linux/slab.h> | ||
11 | #include <asm/uaccess.h> | 12 | #include <asm/uaccess.h> |
12 | 13 | ||
13 | extern const struct reiserfs_key MIN_KEY; | 14 | extern const struct reiserfs_key MIN_KEY; |
@@ -45,8 +46,6 @@ static inline bool is_privroot_deh(struct dentry *dir, | |||
45 | struct reiserfs_de_head *deh) | 46 | struct reiserfs_de_head *deh) |
46 | { | 47 | { |
47 | struct dentry *privroot = REISERFS_SB(dir->d_sb)->priv_root; | 48 | struct dentry *privroot = REISERFS_SB(dir->d_sb)->priv_root; |
48 | if (reiserfs_expose_privroot(dir->d_sb)) | ||
49 | return 0; | ||
50 | return (dir == dir->d_parent && privroot->d_inode && | 49 | return (dir == dir->d_parent && privroot->d_inode && |
51 | deh->deh_objectid == INODE_PKEY(privroot->d_inode)->k_objectid); | 50 | deh->deh_objectid == INODE_PKEY(privroot->d_inode)->k_objectid); |
52 | } | 51 | } |
diff --git a/fs/reiserfs/fix_node.c b/fs/reiserfs/fix_node.c index 6591cb21edf6..1e4250bc3a6f 100644 --- a/fs/reiserfs/fix_node.c +++ b/fs/reiserfs/fix_node.c | |||
@@ -35,6 +35,7 @@ | |||
35 | **/ | 35 | **/ |
36 | 36 | ||
37 | #include <linux/time.h> | 37 | #include <linux/time.h> |
38 | #include <linux/slab.h> | ||
38 | #include <linux/string.h> | 39 | #include <linux/string.h> |
39 | #include <linux/reiserfs_fs.h> | 40 | #include <linux/reiserfs_fs.h> |
40 | #include <linux/buffer_head.h> | 41 | #include <linux/buffer_head.h> |
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index d1da94b82d8f..dc2c65e04853 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/smp_lock.h> | 11 | #include <linux/smp_lock.h> |
12 | #include <linux/pagemap.h> | 12 | #include <linux/pagemap.h> |
13 | #include <linux/highmem.h> | 13 | #include <linux/highmem.h> |
14 | #include <linux/slab.h> | ||
14 | #include <asm/uaccess.h> | 15 | #include <asm/uaccess.h> |
15 | #include <asm/unaligned.h> | 16 | #include <asm/unaligned.h> |
16 | #include <linux/buffer_head.h> | 17 | #include <linux/buffer_head.h> |
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index ba98546fabbd..19fbc810e8e7 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/blkdev.h> | 50 | #include <linux/blkdev.h> |
51 | #include <linux/backing-dev.h> | 51 | #include <linux/backing-dev.h> |
52 | #include <linux/uaccess.h> | 52 | #include <linux/uaccess.h> |
53 | #include <linux/slab.h> | ||
53 | 54 | ||
54 | #include <asm/system.h> | 55 | #include <asm/system.h> |
55 | 56 | ||
@@ -2217,6 +2218,15 @@ static int journal_read_transaction(struct super_block *sb, | |||
2217 | brelse(d_bh); | 2218 | brelse(d_bh); |
2218 | return 1; | 2219 | return 1; |
2219 | } | 2220 | } |
2221 | |||
2222 | if (bdev_read_only(sb->s_bdev)) { | ||
2223 | reiserfs_warning(sb, "clm-2076", | ||
2224 | "device is readonly, unable to replay log"); | ||
2225 | brelse(c_bh); | ||
2226 | brelse(d_bh); | ||
2227 | return -EROFS; | ||
2228 | } | ||
2229 | |||
2220 | trans_id = get_desc_trans_id(desc); | 2230 | trans_id = get_desc_trans_id(desc); |
2221 | /* now we know we've got a good transaction, and it was inside the valid time ranges */ | 2231 | /* now we know we've got a good transaction, and it was inside the valid time ranges */ |
2222 | log_blocks = kmalloc(get_desc_trans_len(desc) * | 2232 | log_blocks = kmalloc(get_desc_trans_len(desc) * |
@@ -2459,12 +2469,6 @@ static int journal_read(struct super_block *sb) | |||
2459 | goto start_log_replay; | 2469 | goto start_log_replay; |
2460 | } | 2470 | } |
2461 | 2471 | ||
2462 | if (continue_replay && bdev_read_only(sb->s_bdev)) { | ||
2463 | reiserfs_warning(sb, "clm-2076", | ||
2464 | "device is readonly, unable to replay log"); | ||
2465 | return -1; | ||
2466 | } | ||
2467 | |||
2468 | /* ok, there are transactions that need to be replayed. start with the first log block, find | 2472 | /* ok, there are transactions that need to be replayed. start with the first log block, find |
2469 | ** all the valid transactions, and pick out the oldest. | 2473 | ** all the valid transactions, and pick out the oldest. |
2470 | */ | 2474 | */ |
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c index 96e4cbbfaa18..d0c43cb99ffc 100644 --- a/fs/reiserfs/namei.c +++ b/fs/reiserfs/namei.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/time.h> | 14 | #include <linux/time.h> |
15 | #include <linux/bitops.h> | 15 | #include <linux/bitops.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/reiserfs_fs.h> | 17 | #include <linux/reiserfs_fs.h> |
17 | #include <linux/reiserfs_acl.h> | 18 | #include <linux/reiserfs_acl.h> |
18 | #include <linux/reiserfs_xattr.h> | 19 | #include <linux/reiserfs_xattr.h> |
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 04bf5d791bda..59125fb36d42 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/vmalloc.h> | 16 | #include <linux/vmalloc.h> |
16 | #include <linux/time.h> | 17 | #include <linux/time.h> |
17 | #include <asm/uaccess.h> | 18 | #include <asm/uaccess.h> |
@@ -1618,10 +1619,8 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) | |||
1618 | save_mount_options(s, data); | 1619 | save_mount_options(s, data); |
1619 | 1620 | ||
1620 | sbi = kzalloc(sizeof(struct reiserfs_sb_info), GFP_KERNEL); | 1621 | sbi = kzalloc(sizeof(struct reiserfs_sb_info), GFP_KERNEL); |
1621 | if (!sbi) { | 1622 | if (!sbi) |
1622 | errval = -ENOMEM; | 1623 | return -ENOMEM; |
1623 | goto error_alloc; | ||
1624 | } | ||
1625 | s->s_fs_info = sbi; | 1624 | s->s_fs_info = sbi; |
1626 | /* Set default values for options: non-aggressive tails, RO on errors */ | 1625 | /* Set default values for options: non-aggressive tails, RO on errors */ |
1627 | REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_SMALLTAIL); | 1626 | 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) | |||
1878 | return (0); | 1877 | return (0); |
1879 | 1878 | ||
1880 | error: | 1879 | error: |
1881 | reiserfs_write_unlock(s); | ||
1882 | error_alloc: | ||
1883 | if (jinit_done) { /* kill the commit thread, free journal ram */ | 1880 | if (jinit_done) { /* kill the commit thread, free journal ram */ |
1884 | journal_release_error(NULL, s); | 1881 | journal_release_error(NULL, s); |
1885 | } | 1882 | } |
1886 | 1883 | ||
1884 | reiserfs_write_unlock(s); | ||
1885 | |||
1887 | reiserfs_free_bitmap_cache(s); | 1886 | reiserfs_free_bitmap_cache(s); |
1888 | if (SB_BUFFER_WITH_SB(s)) | 1887 | if (SB_BUFFER_WITH_SB(s)) |
1889 | brelse(SB_BUFFER_WITH_SB(s)); | 1888 | brelse(SB_BUFFER_WITH_SB(s)); |
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index 37d034ca7d99..e7cc00e636dc 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/dcache.h> | 38 | #include <linux/dcache.h> |
39 | #include <linux/namei.h> | 39 | #include <linux/namei.h> |
40 | #include <linux/errno.h> | 40 | #include <linux/errno.h> |
41 | #include <linux/gfp.h> | ||
41 | #include <linux/fs.h> | 42 | #include <linux/fs.h> |
42 | #include <linux/file.h> | 43 | #include <linux/file.h> |
43 | #include <linux/pagemap.h> | 44 | #include <linux/pagemap.h> |
@@ -553,7 +554,7 @@ reiserfs_xattr_set_handle(struct reiserfs_transaction_handle *th, | |||
553 | if (!err && new_size < i_size_read(dentry->d_inode)) { | 554 | if (!err && new_size < i_size_read(dentry->d_inode)) { |
554 | struct iattr newattrs = { | 555 | struct iattr newattrs = { |
555 | .ia_ctime = current_fs_time(inode->i_sb), | 556 | .ia_ctime = current_fs_time(inode->i_sb), |
556 | .ia_size = buffer_size, | 557 | .ia_size = new_size, |
557 | .ia_valid = ATTR_SIZE | ATTR_CTIME, | 558 | .ia_valid = ATTR_SIZE | ATTR_CTIME, |
558 | }; | 559 | }; |
559 | 560 | ||
@@ -972,21 +973,13 @@ int reiserfs_permission(struct inode *inode, int mask) | |||
972 | return generic_permission(inode, mask, NULL); | 973 | return generic_permission(inode, mask, NULL); |
973 | } | 974 | } |
974 | 975 | ||
975 | /* This will catch lookups from the fs root to .reiserfs_priv */ | 976 | static int xattr_hide_revalidate(struct dentry *dentry, struct nameidata *nd) |
976 | static int | ||
977 | xattr_lookup_poison(struct dentry *dentry, struct qstr *q1, struct qstr *name) | ||
978 | { | 977 | { |
979 | struct dentry *priv_root = REISERFS_SB(dentry->d_sb)->priv_root; | 978 | return -EPERM; |
980 | if (container_of(q1, struct dentry, d_name) == priv_root) | ||
981 | return -ENOENT; | ||
982 | if (q1->len == name->len && | ||
983 | !memcmp(q1->name, name->name, name->len)) | ||
984 | return 0; | ||
985 | return 1; | ||
986 | } | 979 | } |
987 | 980 | ||
988 | static const struct dentry_operations xattr_lookup_poison_ops = { | 981 | static const struct dentry_operations xattr_lookup_poison_ops = { |
989 | .d_compare = xattr_lookup_poison, | 982 | .d_revalidate = xattr_hide_revalidate, |
990 | }; | 983 | }; |
991 | 984 | ||
992 | int reiserfs_lookup_privroot(struct super_block *s) | 985 | int reiserfs_lookup_privroot(struct super_block *s) |
@@ -1000,8 +993,7 @@ int reiserfs_lookup_privroot(struct super_block *s) | |||
1000 | strlen(PRIVROOT_NAME)); | 993 | strlen(PRIVROOT_NAME)); |
1001 | if (!IS_ERR(dentry)) { | 994 | if (!IS_ERR(dentry)) { |
1002 | REISERFS_SB(s)->priv_root = dentry; | 995 | REISERFS_SB(s)->priv_root = dentry; |
1003 | if (!reiserfs_expose_privroot(s)) | 996 | dentry->d_op = &xattr_lookup_poison_ops; |
1004 | s->s_root->d_op = &xattr_lookup_poison_ops; | ||
1005 | if (dentry->d_inode) | 997 | if (dentry->d_inode) |
1006 | dentry->d_inode->i_flags |= S_PRIVATE; | 998 | dentry->d_inode->i_flags |= S_PRIVATE; |
1007 | } else | 999 | } else |
diff --git a/fs/reiserfs/xattr_acl.c b/fs/reiserfs/xattr_acl.c index dd20a7883f0f..9cdb759645a9 100644 --- a/fs/reiserfs/xattr_acl.c +++ b/fs/reiserfs/xattr_acl.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/errno.h> | 5 | #include <linux/errno.h> |
6 | #include <linux/pagemap.h> | 6 | #include <linux/pagemap.h> |
7 | #include <linux/xattr.h> | 7 | #include <linux/xattr.h> |
8 | #include <linux/slab.h> | ||
8 | #include <linux/posix_acl_xattr.h> | 9 | #include <linux/posix_acl_xattr.h> |
9 | #include <linux/reiserfs_xattr.h> | 10 | #include <linux/reiserfs_xattr.h> |
10 | #include <linux/reiserfs_acl.h> | 11 | #include <linux/reiserfs_acl.h> |
diff --git a/fs/reiserfs/xattr_security.c b/fs/reiserfs/xattr_security.c index d8b5bfcbdd30..7271a477c041 100644 --- a/fs/reiserfs/xattr_security.c +++ b/fs/reiserfs/xattr_security.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/fs.h> | 3 | #include <linux/fs.h> |
4 | #include <linux/pagemap.h> | 4 | #include <linux/pagemap.h> |
5 | #include <linux/xattr.h> | 5 | #include <linux/xattr.h> |
6 | #include <linux/slab.h> | ||
6 | #include <linux/reiserfs_xattr.h> | 7 | #include <linux/reiserfs_xattr.h> |
7 | #include <linux/security.h> | 8 | #include <linux/security.h> |
8 | #include <asm/uaccess.h> | 9 | #include <asm/uaccess.h> |
@@ -76,7 +77,7 @@ int reiserfs_security_init(struct inode *dir, struct inode *inode, | |||
76 | return error; | 77 | return error; |
77 | } | 78 | } |
78 | 79 | ||
79 | if (sec->length) { | 80 | if (sec->length && reiserfs_xattrs_initialized(inode->i_sb)) { |
80 | blocks = reiserfs_xattr_jcreate_nblocks(inode) + | 81 | blocks = reiserfs_xattr_jcreate_nblocks(inode) + |
81 | reiserfs_xattr_nblocks(inode, sec->length); | 82 | reiserfs_xattr_nblocks(inode, sec->length); |
82 | /* We don't want to count the directories twice if we have | 83 | /* We don't want to count the directories twice if we have |