diff options
Diffstat (limited to 'fs/jffs2')
-rw-r--r-- | fs/jffs2/TODO | 2 | ||||
-rw-r--r-- | fs/jffs2/acl.c | 2 | ||||
-rw-r--r-- | fs/jffs2/compr_zlib.c | 7 | ||||
-rw-r--r-- | fs/jffs2/readinode.c | 2 | ||||
-rw-r--r-- | fs/jffs2/summary.c | 4 | ||||
-rw-r--r-- | fs/jffs2/wbuf.c | 2 | ||||
-rw-r--r-- | fs/jffs2/xattr.c | 2 |
7 files changed, 11 insertions, 10 deletions
diff --git a/fs/jffs2/TODO b/fs/jffs2/TODO index 5d3ea4070f01..ca28964abd4b 100644 --- a/fs/jffs2/TODO +++ b/fs/jffs2/TODO | |||
@@ -11,7 +11,7 @@ | |||
11 | - checkpointing (do we need this? scan is quite fast) | 11 | - checkpointing (do we need this? scan is quite fast) |
12 | - make the scan code populate real inodes so read_inode just after | 12 | - make the scan code populate real inodes so read_inode just after |
13 | mount doesn't have to read the flash twice for large files. | 13 | mount doesn't have to read the flash twice for large files. |
14 | Make this a per-inode option, changable with chattr, so you can | 14 | Make this a per-inode option, changeable with chattr, so you can |
15 | decide which inodes should be in-core immediately after mount. | 15 | decide which inodes should be in-core immediately after mount. |
16 | - test, test, test | 16 | - test, test, test |
17 | 17 | ||
diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c index 95b79672150a..828a0e1ea438 100644 --- a/fs/jffs2/acl.c +++ b/fs/jffs2/acl.c | |||
@@ -402,7 +402,7 @@ static int jffs2_acl_setxattr(struct dentry *dentry, const char *name, | |||
402 | 402 | ||
403 | if (name[0] != '\0') | 403 | if (name[0] != '\0') |
404 | return -EINVAL; | 404 | return -EINVAL; |
405 | if (!is_owner_or_cap(dentry->d_inode)) | 405 | if (!inode_owner_or_capable(dentry->d_inode)) |
406 | return -EPERM; | 406 | return -EPERM; |
407 | 407 | ||
408 | if (value) { | 408 | if (value) { |
diff --git a/fs/jffs2/compr_zlib.c b/fs/jffs2/compr_zlib.c index fd05a0b9431d..5a001020c542 100644 --- a/fs/jffs2/compr_zlib.c +++ b/fs/jffs2/compr_zlib.c | |||
@@ -40,12 +40,13 @@ static z_stream inf_strm, def_strm; | |||
40 | 40 | ||
41 | static int __init alloc_workspaces(void) | 41 | static int __init alloc_workspaces(void) |
42 | { | 42 | { |
43 | def_strm.workspace = vmalloc(zlib_deflate_workspacesize()); | 43 | def_strm.workspace = vmalloc(zlib_deflate_workspacesize(MAX_WBITS, |
44 | MAX_MEM_LEVEL)); | ||
44 | if (!def_strm.workspace) { | 45 | if (!def_strm.workspace) { |
45 | printk(KERN_WARNING "Failed to allocate %d bytes for deflate workspace\n", zlib_deflate_workspacesize()); | 46 | printk(KERN_WARNING "Failed to allocate %d bytes for deflate workspace\n", zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL)); |
46 | return -ENOMEM; | 47 | return -ENOMEM; |
47 | } | 48 | } |
48 | D1(printk(KERN_DEBUG "Allocated %d bytes for deflate workspace\n", zlib_deflate_workspacesize())); | 49 | D1(printk(KERN_DEBUG "Allocated %d bytes for deflate workspace\n", zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL))); |
49 | inf_strm.workspace = vmalloc(zlib_inflate_workspacesize()); | 50 | inf_strm.workspace = vmalloc(zlib_inflate_workspacesize()); |
50 | if (!inf_strm.workspace) { | 51 | if (!inf_strm.workspace) { |
51 | printk(KERN_WARNING "Failed to allocate %d bytes for inflate workspace\n", zlib_inflate_workspacesize()); | 52 | printk(KERN_WARNING "Failed to allocate %d bytes for inflate workspace\n", zlib_inflate_workspacesize()); |
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c index d32ee9412cb9..2ab1a0d91210 100644 --- a/fs/jffs2/readinode.c +++ b/fs/jffs2/readinode.c | |||
@@ -24,7 +24,7 @@ | |||
24 | * | 24 | * |
25 | * Returns: 0 if the data CRC is correct; | 25 | * Returns: 0 if the data CRC is correct; |
26 | * 1 - if incorrect; | 26 | * 1 - if incorrect; |
27 | * error code if an error occured. | 27 | * error code if an error occurred. |
28 | */ | 28 | */ |
29 | static int check_node_data(struct jffs2_sb_info *c, struct jffs2_tmp_dnode_info *tn) | 29 | static int check_node_data(struct jffs2_sb_info *c, struct jffs2_tmp_dnode_info *tn) |
30 | { | 30 | { |
diff --git a/fs/jffs2/summary.c b/fs/jffs2/summary.c index 800171dca53b..e537fb0e0184 100644 --- a/fs/jffs2/summary.c +++ b/fs/jffs2/summary.c | |||
@@ -121,7 +121,7 @@ int jffs2_sum_add_inode_mem(struct jffs2_summary *s, struct jffs2_raw_inode *ri, | |||
121 | temp->nodetype = ri->nodetype; | 121 | temp->nodetype = ri->nodetype; |
122 | temp->inode = ri->ino; | 122 | temp->inode = ri->ino; |
123 | temp->version = ri->version; | 123 | temp->version = ri->version; |
124 | temp->offset = cpu_to_je32(ofs); /* relative offset from the begining of the jeb */ | 124 | temp->offset = cpu_to_je32(ofs); /* relative offset from the beginning of the jeb */ |
125 | temp->totlen = ri->totlen; | 125 | temp->totlen = ri->totlen; |
126 | temp->next = NULL; | 126 | temp->next = NULL; |
127 | 127 | ||
@@ -139,7 +139,7 @@ int jffs2_sum_add_dirent_mem(struct jffs2_summary *s, struct jffs2_raw_dirent *r | |||
139 | 139 | ||
140 | temp->nodetype = rd->nodetype; | 140 | temp->nodetype = rd->nodetype; |
141 | temp->totlen = rd->totlen; | 141 | temp->totlen = rd->totlen; |
142 | temp->offset = cpu_to_je32(ofs); /* relative from the begining of the jeb */ | 142 | temp->offset = cpu_to_je32(ofs); /* relative from the beginning of the jeb */ |
143 | temp->pino = rd->pino; | 143 | temp->pino = rd->pino; |
144 | temp->version = rd->version; | 144 | temp->version = rd->version; |
145 | temp->ino = rd->ino; | 145 | temp->ino = rd->ino; |
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c index 07ee1546b2fa..4515bea0268f 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c | |||
@@ -1116,7 +1116,7 @@ int jffs2_write_nand_cleanmarker(struct jffs2_sb_info *c, | |||
1116 | 1116 | ||
1117 | /* | 1117 | /* |
1118 | * On NAND we try to mark this block bad. If the block was erased more | 1118 | * On NAND we try to mark this block bad. If the block was erased more |
1119 | * than MAX_ERASE_FAILURES we mark it finaly bad. | 1119 | * than MAX_ERASE_FAILURES we mark it finally bad. |
1120 | * Don't care about failures. This block remains on the erase-pending | 1120 | * Don't care about failures. This block remains on the erase-pending |
1121 | * or badblock list as long as nobody manipulates the flash with | 1121 | * or badblock list as long as nobody manipulates the flash with |
1122 | * a bootloader or something like that. | 1122 | * a bootloader or something like that. |
diff --git a/fs/jffs2/xattr.c b/fs/jffs2/xattr.c index 4f9cc0482949..3e93cdd19005 100644 --- a/fs/jffs2/xattr.c +++ b/fs/jffs2/xattr.c | |||
@@ -31,7 +31,7 @@ | |||
31 | * is used to release xattr name/value pair and detach from c->xattrindex. | 31 | * is used to release xattr name/value pair and detach from c->xattrindex. |
32 | * reclaim_xattr_datum(c) | 32 | * reclaim_xattr_datum(c) |
33 | * is used to reclaim xattr name/value pairs on the xattr name/value pair cache when | 33 | * is used to reclaim xattr name/value pairs on the xattr name/value pair cache when |
34 | * memory usage by cache is over c->xdatum_mem_threshold. Currently, this threshold | 34 | * memory usage by cache is over c->xdatum_mem_threshold. Currently, this threshold |
35 | * is hard coded as 32KiB. | 35 | * is hard coded as 32KiB. |
36 | * do_verify_xattr_datum(c, xd) | 36 | * do_verify_xattr_datum(c, xd) |
37 | * is used to load the xdatum informations without name/value pair from the medium. | 37 | * is used to load the xdatum informations without name/value pair from the medium. |