aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2')
-rw-r--r--fs/jffs2/acl.c2
-rw-r--r--fs/jffs2/background.c1
-rw-r--r--fs/jffs2/malloc.c18
-rw-r--r--fs/jffs2/super.c2
4 files changed, 12 insertions, 11 deletions
diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c
index a46101ee867a..65b3a1b5b88d 100644
--- a/fs/jffs2/acl.c
+++ b/fs/jffs2/acl.c
@@ -435,7 +435,7 @@ static int jffs2_acl_setxattr(struct inode *inode, int type, const void *value,
435 struct posix_acl *acl; 435 struct posix_acl *acl;
436 int rc; 436 int rc;
437 437
438 if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) 438 if (!is_owner_or_cap(inode))
439 return -EPERM; 439 return -EPERM;
440 440
441 if (value) { 441 if (value) {
diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c
index 8754b2742112..d568ae846741 100644
--- a/fs/jffs2/background.c
+++ b/fs/jffs2/background.c
@@ -81,6 +81,7 @@ static int jffs2_garbage_collect_thread(void *_c)
81 81
82 set_user_nice(current, 10); 82 set_user_nice(current, 10);
83 83
84 set_freezable();
84 for (;;) { 85 for (;;) {
85 allow_signal(SIGHUP); 86 allow_signal(SIGHUP);
86 again: 87 again:
diff --git a/fs/jffs2/malloc.c b/fs/jffs2/malloc.c
index 35c1a5e30ba1..f9211252b5f1 100644
--- a/fs/jffs2/malloc.c
+++ b/fs/jffs2/malloc.c
@@ -33,56 +33,56 @@ int __init jffs2_create_slab_caches(void)
33{ 33{
34 full_dnode_slab = kmem_cache_create("jffs2_full_dnode", 34 full_dnode_slab = kmem_cache_create("jffs2_full_dnode",
35 sizeof(struct jffs2_full_dnode), 35 sizeof(struct jffs2_full_dnode),
36 0, 0, NULL, NULL); 36 0, 0, NULL);
37 if (!full_dnode_slab) 37 if (!full_dnode_slab)
38 goto err; 38 goto err;
39 39
40 raw_dirent_slab = kmem_cache_create("jffs2_raw_dirent", 40 raw_dirent_slab = kmem_cache_create("jffs2_raw_dirent",
41 sizeof(struct jffs2_raw_dirent), 41 sizeof(struct jffs2_raw_dirent),
42 0, 0, NULL, NULL); 42 0, 0, NULL);
43 if (!raw_dirent_slab) 43 if (!raw_dirent_slab)
44 goto err; 44 goto err;
45 45
46 raw_inode_slab = kmem_cache_create("jffs2_raw_inode", 46 raw_inode_slab = kmem_cache_create("jffs2_raw_inode",
47 sizeof(struct jffs2_raw_inode), 47 sizeof(struct jffs2_raw_inode),
48 0, 0, NULL, NULL); 48 0, 0, NULL);
49 if (!raw_inode_slab) 49 if (!raw_inode_slab)
50 goto err; 50 goto err;
51 51
52 tmp_dnode_info_slab = kmem_cache_create("jffs2_tmp_dnode", 52 tmp_dnode_info_slab = kmem_cache_create("jffs2_tmp_dnode",
53 sizeof(struct jffs2_tmp_dnode_info), 53 sizeof(struct jffs2_tmp_dnode_info),
54 0, 0, NULL, NULL); 54 0, 0, NULL);
55 if (!tmp_dnode_info_slab) 55 if (!tmp_dnode_info_slab)
56 goto err; 56 goto err;
57 57
58 raw_node_ref_slab = kmem_cache_create("jffs2_refblock", 58 raw_node_ref_slab = kmem_cache_create("jffs2_refblock",
59 sizeof(struct jffs2_raw_node_ref) * (REFS_PER_BLOCK + 1), 59 sizeof(struct jffs2_raw_node_ref) * (REFS_PER_BLOCK + 1),
60 0, 0, NULL, NULL); 60 0, 0, NULL);
61 if (!raw_node_ref_slab) 61 if (!raw_node_ref_slab)
62 goto err; 62 goto err;
63 63
64 node_frag_slab = kmem_cache_create("jffs2_node_frag", 64 node_frag_slab = kmem_cache_create("jffs2_node_frag",
65 sizeof(struct jffs2_node_frag), 65 sizeof(struct jffs2_node_frag),
66 0, 0, NULL, NULL); 66 0, 0, NULL);
67 if (!node_frag_slab) 67 if (!node_frag_slab)
68 goto err; 68 goto err;
69 69
70 inode_cache_slab = kmem_cache_create("jffs2_inode_cache", 70 inode_cache_slab = kmem_cache_create("jffs2_inode_cache",
71 sizeof(struct jffs2_inode_cache), 71 sizeof(struct jffs2_inode_cache),
72 0, 0, NULL, NULL); 72 0, 0, NULL);
73 if (!inode_cache_slab) 73 if (!inode_cache_slab)
74 goto err; 74 goto err;
75 75
76#ifdef CONFIG_JFFS2_FS_XATTR 76#ifdef CONFIG_JFFS2_FS_XATTR
77 xattr_datum_cache = kmem_cache_create("jffs2_xattr_datum", 77 xattr_datum_cache = kmem_cache_create("jffs2_xattr_datum",
78 sizeof(struct jffs2_xattr_datum), 78 sizeof(struct jffs2_xattr_datum),
79 0, 0, NULL, NULL); 79 0, 0, NULL);
80 if (!xattr_datum_cache) 80 if (!xattr_datum_cache)
81 goto err; 81 goto err;
82 82
83 xattr_ref_cache = kmem_cache_create("jffs2_xattr_ref", 83 xattr_ref_cache = kmem_cache_create("jffs2_xattr_ref",
84 sizeof(struct jffs2_xattr_ref), 84 sizeof(struct jffs2_xattr_ref),
85 0, 0, NULL, NULL); 85 0, 0, NULL);
86 if (!xattr_ref_cache) 86 if (!xattr_ref_cache)
87 goto err; 87 goto err;
88#endif 88#endif
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c
index e220d3bd610d..be2b70c2ec16 100644
--- a/fs/jffs2/super.c
+++ b/fs/jffs2/super.c
@@ -192,7 +192,7 @@ static int __init init_jffs2_fs(void)
192 sizeof(struct jffs2_inode_info), 192 sizeof(struct jffs2_inode_info),
193 0, (SLAB_RECLAIM_ACCOUNT| 193 0, (SLAB_RECLAIM_ACCOUNT|
194 SLAB_MEM_SPREAD), 194 SLAB_MEM_SPREAD),
195 jffs2_i_init_once, NULL); 195 jffs2_i_init_once);
196 if (!jffs2_inode_cachep) { 196 if (!jffs2_inode_cachep) {
197 printk(KERN_ERR "JFFS2 error: Failed to initialise inode cache\n"); 197 printk(KERN_ERR "JFFS2 error: Failed to initialise inode cache\n");
198 return -ENOMEM; 198 return -ENOMEM;