projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] mm: clean up pagecache allocation
[powerpc.git]
/
fs
/
befs
/
linuxvfs.c
diff --git
a/fs/befs/linuxvfs.c
b/fs/befs/linuxvfs.c
index
fcaeead
..
07f7144
100644
(file)
--- a/
fs/befs/linuxvfs.c
+++ b/
fs/befs/linuxvfs.c
@@
-22,7
+22,6
@@
#include "datastream.h"
#include "super.h"
#include "io.h"
#include "datastream.h"
#include "super.h"
#include "io.h"
-#include "endian.h"
MODULE_DESCRIPTION("BeOS File System (BeFS) driver");
MODULE_AUTHOR("Will Dyson");
MODULE_DESCRIPTION("BeOS File System (BeFS) driver");
MODULE_AUTHOR("Will Dyson");
@@
-365,7
+364,6
@@
befs_read_inode(struct inode *inode)
inode->i_mtime.tv_nsec = 0; /* lower 16 bits are not a time */
inode->i_ctime = inode->i_mtime;
inode->i_atime = inode->i_mtime;
inode->i_mtime.tv_nsec = 0; /* lower 16 bits are not a time */
inode->i_ctime = inode->i_mtime;
inode->i_atime = inode->i_mtime;
- inode->i_blksize = befs_sb->block_size;
befs_ino->i_inode_num = fsrun_to_cpu(sb, raw_inode->inode_num);
befs_ino->i_parent = fsrun_to_cpu(sb, raw_inode->parent);
befs_ino->i_inode_num = fsrun_to_cpu(sb, raw_inode->inode_num);
befs_ino->i_parent = fsrun_to_cpu(sb, raw_inode->parent);
@@
-446,9
+444,7
@@
befs_init_inodecache(void)
static void
befs_destroy_inodecache(void)
{
static void
befs_destroy_inodecache(void)
{
- if (kmem_cache_destroy(befs_inode_cachep))
- printk(KERN_ERR "befs_destroy_inodecache: "
- "not all structures were freed\n");
+ kmem_cache_destroy(befs_inode_cachep);
}
/*
}
/*
@@
-512,7
+508,11
@@
befs_utf2nls(struct super_block *sb, const char *in,
wchar_t uni;
int unilen, utflen;
char *result;
wchar_t uni;
int unilen, utflen;
char *result;
- int maxlen = in_len; /* The utf8->nls conversion can't make more chars */
+ /* The utf8->nls conversion won't make the final nls string bigger
+ * than the utf one, but if the string is pure ascii they'll have the
+ * same width and an extra char is needed to save the additional \0
+ */
+ int maxlen = in_len + 1;
befs_debug(sb, "---> utf2nls()");
befs_debug(sb, "---> utf2nls()");
@@
-588,7
+588,10
@@
befs_nls2utf(struct super_block *sb, const char *in,
wchar_t uni;
int unilen, utflen;
char *result;
wchar_t uni;
int unilen, utflen;
char *result;
- int maxlen = 3 * in_len;
+ /* There're nls characters that will translate to 3-chars-wide UTF-8
+ * characters, a additional byte is needed to save the final \0
+ * in special cases */
+ int maxlen = (3 * in_len) + 1;
befs_debug(sb, "---> nls2utf()\n");
befs_debug(sb, "---> nls2utf()\n");