aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/namei.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2013-06-07 03:33:07 -0400
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-06-11 03:01:09 -0400
commit2d4d9fb591fe83d9f0559afaa9736ebc8edad0aa (patch)
tree27ef8c9fca7b1e56674ed23e3aecdacf36e67bd3 /fs/f2fs/namei.c
parent5fb08372a689360b7db51b0cfb9a068fddf279a2 (diff)
f2fs: fix i_blocks translation on various types of files
Basically an inode manages the number of allocated blocks with inode->i_blocks which is represented in a unit of sectors, not file system blocks. But, f2fs has used i_blocks in a unit of file system blocks, and f2fs_getattr translates it to the number of sectors when fstat is called. However, previously f2fs_file_inode_operations only has this, so this patch adds it to all the types of inode_operations. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/namei.c')
-rw-r--r--fs/f2fs/namei.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 1fe150276fad..810444ee6b5e 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -490,6 +490,7 @@ const struct inode_operations f2fs_dir_inode_operations = {
490 .rmdir = f2fs_rmdir, 490 .rmdir = f2fs_rmdir,
491 .mknod = f2fs_mknod, 491 .mknod = f2fs_mknod,
492 .rename = f2fs_rename, 492 .rename = f2fs_rename,
493 .getattr = f2fs_getattr,
493 .setattr = f2fs_setattr, 494 .setattr = f2fs_setattr,
494 .get_acl = f2fs_get_acl, 495 .get_acl = f2fs_get_acl,
495#ifdef CONFIG_F2FS_FS_XATTR 496#ifdef CONFIG_F2FS_FS_XATTR
@@ -504,6 +505,7 @@ const struct inode_operations f2fs_symlink_inode_operations = {
504 .readlink = generic_readlink, 505 .readlink = generic_readlink,
505 .follow_link = page_follow_link_light, 506 .follow_link = page_follow_link_light,
506 .put_link = page_put_link, 507 .put_link = page_put_link,
508 .getattr = f2fs_getattr,
507 .setattr = f2fs_setattr, 509 .setattr = f2fs_setattr,
508#ifdef CONFIG_F2FS_FS_XATTR 510#ifdef CONFIG_F2FS_FS_XATTR
509 .setxattr = generic_setxattr, 511 .setxattr = generic_setxattr,
@@ -514,6 +516,7 @@ const struct inode_operations f2fs_symlink_inode_operations = {
514}; 516};
515 517
516const struct inode_operations f2fs_special_inode_operations = { 518const struct inode_operations f2fs_special_inode_operations = {
519 .getattr = f2fs_getattr,
517 .setattr = f2fs_setattr, 520 .setattr = f2fs_setattr,
518 .get_acl = f2fs_get_acl, 521 .get_acl = f2fs_get_acl,
519#ifdef CONFIG_F2FS_FS_XATTR 522#ifdef CONFIG_F2FS_FS_XATTR