diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-05-19 21:23:40 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-05-28 02:03:03 -0400 |
commit | 9a55ed656c9afbe41316ab2373bc063359b7683f (patch) | |
tree | 315ad7e31de2c5624c1ca3ab5912288b08baa402 /fs/f2fs/recovery.c | |
parent | 9851e6e18943f2537acb44a4eb51c6958e8dbc3e (diff) |
f2fs: remove unnecessary kmap/kunmap operations
The allocated page used by the recovery is not on HIGHMEM, so that we don't
need to use kmap/kunmap.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/recovery.c')
-rw-r--r-- | fs/f2fs/recovery.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index 6ad4e539c60a..f91ff0f0044d 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2fs/recovery.c | |||
@@ -40,11 +40,11 @@ static struct fsync_inode_entry *get_fsync_inode(struct list_head *head, | |||
40 | 40 | ||
41 | static int recover_dentry(struct page *ipage, struct inode *inode) | 41 | static int recover_dentry(struct page *ipage, struct inode *inode) |
42 | { | 42 | { |
43 | struct f2fs_node *raw_node = (struct f2fs_node *)kmap(ipage); | 43 | void *kaddr = page_address(ipage); |
44 | struct f2fs_node *raw_node = (struct f2fs_node *)kaddr; | ||
44 | struct f2fs_inode *raw_inode = &(raw_node->i); | 45 | struct f2fs_inode *raw_inode = &(raw_node->i); |
45 | nid_t pino = le32_to_cpu(raw_inode->i_pino); | 46 | nid_t pino = le32_to_cpu(raw_inode->i_pino); |
46 | struct qstr name; | 47 | struct qstr name; |
47 | struct f2fs_dir_entry *de; | ||
48 | struct page *page; | 48 | struct page *page; |
49 | struct inode *dir; | 49 | struct inode *dir; |
50 | int err = 0; | 50 | int err = 0; |
@@ -62,8 +62,7 @@ static int recover_dentry(struct page *ipage, struct inode *inode) | |||
62 | name.len = le32_to_cpu(raw_inode->i_namelen); | 62 | name.len = le32_to_cpu(raw_inode->i_namelen); |
63 | name.name = raw_inode->i_name; | 63 | name.name = raw_inode->i_name; |
64 | 64 | ||
65 | de = f2fs_find_entry(dir, &name, &page); | 65 | if (f2fs_find_entry(dir, &name, &page)) { |
66 | if (de) { | ||
67 | kunmap(page); | 66 | kunmap(page); |
68 | f2fs_put_page(page, 0); | 67 | f2fs_put_page(page, 0); |
69 | } else { | 68 | } else { |
@@ -73,7 +72,6 @@ out: | |||
73 | f2fs_msg(inode->i_sb, KERN_NOTICE, "recover_inode and its dentry: " | 72 | f2fs_msg(inode->i_sb, KERN_NOTICE, "recover_inode and its dentry: " |
74 | "ino = %x, name = %s, dir = %lx, err = %d", | 73 | "ino = %x, name = %s, dir = %lx, err = %d", |
75 | ino_of_node(ipage), raw_inode->i_name, dir->i_ino, err); | 74 | ino_of_node(ipage), raw_inode->i_name, dir->i_ino, err); |
76 | kunmap(ipage); | ||
77 | return err; | 75 | return err; |
78 | } | 76 | } |
79 | 77 | ||