aboutsummaryrefslogtreecommitdiffstats
path: root/fs/befs/linuxvfs.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-06 19:35:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-06 19:35:10 -0400
commit57d326169e878a1a37b2bccd1cf81f6809ee67b9 (patch)
tree86ed74ae4dc2beaebce1c67b8459f1873b777d3a /fs/befs/linuxvfs.c
parent7b215de3d0abbc4f6daf2efd19e8809af0564490 (diff)
parent0244756edc4b98c129e92c7061d9f383708cf786 (diff)
Merge branch 'akpm' (patches from Andrew Morton) into next
Merge more updates from Andrew Morton: - Most of the rest of MM. This includes "mark remap_file_pages syscall as deprecated" but the actual "replace remap_file_pages syscall with emulation" is held back. I guess we'll need to work out when to pull the trigger on that one. - various minor cleanups to obscure filesystems - the drivers/rtc queue - hfsplus updates - ufs, hpfs, fatfs, affs, reiserfs - Documentation/ - signals - procfs - cpu hotplug - lib/idr.c - rapidio - sysctl - ipc updates * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (171 commits) ufs: sb mutex merge + mutex_destroy powerpc: update comments for generic idle conversion cris: update comments for generic idle conversion idle: remove cpu_idle() forward declarations nbd: zero from and len fields in NBD_CMD_DISCONNECT. mm: convert some level-less printks to pr_* MAINTAINERS: adi-buildroot-devel is moderated MAINTAINERS: add linux-api for review of API/ABI changes mm/kmemleak-test.c: use pr_fmt for logging fs/dlm/debug_fs.c: replace seq_printf by seq_puts fs/dlm/lockspace.c: convert simple_str to kstr fs/dlm/config.c: convert simple_str to kstr mm: mark remap_file_pages() syscall as deprecated mm: memcontrol: remove unnecessary memcg argument from soft limit functions mm: memcontrol: clean up memcg zoneinfo lookup mm/memblock.c: call kmemleak directly from memblock_(alloc|free) mm/mempool.c: update the kmemleak stack trace for mempool allocations lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations mm: introduce kmemleak_update_trace() mm/kmemleak.c: use %u to print ->checksum ...
Diffstat (limited to 'fs/befs/linuxvfs.c')
-rw-r--r--fs/befs/linuxvfs.c29
1 files changed, 10 insertions, 19 deletions
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index d626756ff721..a16fbd4e8241 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -133,14 +133,6 @@ befs_get_block(struct inode *inode, sector_t block,
133 133
134 befs_debug(sb, "---> befs_get_block() for inode %lu, block %ld", 134 befs_debug(sb, "---> befs_get_block() for inode %lu, block %ld",
135 (unsigned long)inode->i_ino, (long)block); 135 (unsigned long)inode->i_ino, (long)block);
136
137 if (block < 0) {
138 befs_error(sb, "befs_get_block() was asked for a block "
139 "number less than zero: block %ld in inode %lu",
140 (long)block, (unsigned long)inode->i_ino);
141 return -EIO;
142 }
143
144 if (create) { 136 if (create) {
145 befs_error(sb, "befs_get_block() was asked to write to " 137 befs_error(sb, "befs_get_block() was asked to write to "
146 "block %ld in inode %lu", (long)block, 138 "block %ld in inode %lu", (long)block,
@@ -396,9 +388,8 @@ static struct inode *befs_iget(struct super_block *sb, unsigned long ino)
396 if (S_ISLNK(inode->i_mode) && !(befs_ino->i_flags & BEFS_LONG_SYMLINK)){ 388 if (S_ISLNK(inode->i_mode) && !(befs_ino->i_flags & BEFS_LONG_SYMLINK)){
397 inode->i_size = 0; 389 inode->i_size = 0;
398 inode->i_blocks = befs_sb->block_size / VFS_BLOCK_SIZE; 390 inode->i_blocks = befs_sb->block_size / VFS_BLOCK_SIZE;
399 strncpy(befs_ino->i_data.symlink, raw_inode->data.symlink, 391 strlcpy(befs_ino->i_data.symlink, raw_inode->data.symlink,
400 BEFS_SYMLINK_LEN - 1); 392 BEFS_SYMLINK_LEN);
401 befs_ino->i_data.symlink[BEFS_SYMLINK_LEN - 1] = '\0';
402 } else { 393 } else {
403 int num_blks; 394 int num_blks;
404 395
@@ -591,21 +582,21 @@ befs_utf2nls(struct super_block *sb, const char *in,
591/** 582/**
592 * befs_nls2utf - Convert NLS string to utf8 encodeing 583 * befs_nls2utf - Convert NLS string to utf8 encodeing
593 * @sb: Superblock 584 * @sb: Superblock
594 * @src: Input string buffer in NLS format 585 * @in: Input string buffer in NLS format
595 * @srclen: Length of input string in bytes 586 * @in_len: Length of input string in bytes
596 * @dest: The output string in UTF-8 format 587 * @out: The output string in UTF-8 format
597 * @destlen: Length of the output buffer 588 * @out_len: Length of the output buffer
598 * 589 *
599 * Converts input string @src, which is in the format of the loaded NLS map, 590 * Converts input string @in, which is in the format of the loaded NLS map,
600 * into a utf8 string. 591 * into a utf8 string.
601 * 592 *
602 * The destination string @dest is allocated by this function and the caller is 593 * The destination string @out is allocated by this function and the caller is
603 * responsible for freeing it with kfree() 594 * responsible for freeing it with kfree()
604 * 595 *
605 * On return, *@destlen is the length of @dest in bytes. 596 * On return, *@out_len is the length of @out in bytes.
606 * 597 *
607 * On success, the return value is the number of utf8 characters written to 598 * On success, the return value is the number of utf8 characters written to
608 * the output buffer @dest. 599 * the output buffer @out.
609 * 600 *
610 * On Failure, a negative number coresponding to the error code is returned. 601 * On Failure, a negative number coresponding to the error code is returned.
611 */ 602 */