diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-06-21 00:44:02 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-07-09 17:04:25 -0400 |
commit | a014e037be26b5c9ee6fb4e49e7804141cf3bb89 (patch) | |
tree | 1cd8ec5974bb15f6afe3010ce407365ca155fe81 /fs/f2fs | |
parent | b97a9b5da891ab6aff5a6a19c569c9c4c5563d48 (diff) |
f2fs: clean up an unused parameter and assignment
This patch cleans up simple unnecessary codes.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/dir.c | 2 | ||||
-rw-r--r-- | fs/f2fs/f2fs.h | 2 | ||||
-rw-r--r-- | fs/f2fs/namei.c | 26 | ||||
-rw-r--r-- | fs/f2fs/node.c | 2 |
4 files changed, 12 insertions, 20 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index fb7e01ed47dc..087b03dbca9b 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c | |||
@@ -338,7 +338,7 @@ static struct page *init_inode_metadata(struct inode *inode, | |||
338 | int err; | 338 | int err; |
339 | 339 | ||
340 | if (is_inode_flag_set(F2FS_I(inode), FI_NEW_INODE)) { | 340 | if (is_inode_flag_set(F2FS_I(inode), FI_NEW_INODE)) { |
341 | page = new_inode_page(inode, name); | 341 | page = new_inode_page(inode); |
342 | if (IS_ERR(page)) | 342 | if (IS_ERR(page)) |
343 | return page; | 343 | return page; |
344 | 344 | ||
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index ca421a8e47d9..3f0291b840ef 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h | |||
@@ -1174,7 +1174,7 @@ int truncate_inode_blocks(struct inode *, pgoff_t); | |||
1174 | int truncate_xattr_node(struct inode *, struct page *); | 1174 | int truncate_xattr_node(struct inode *, struct page *); |
1175 | int wait_on_node_pages_writeback(struct f2fs_sb_info *, nid_t); | 1175 | int wait_on_node_pages_writeback(struct f2fs_sb_info *, nid_t); |
1176 | void remove_inode_page(struct inode *); | 1176 | void remove_inode_page(struct inode *); |
1177 | struct page *new_inode_page(struct inode *, const struct qstr *); | 1177 | struct page *new_inode_page(struct inode *); |
1178 | struct page *new_node_page(struct dnode_of_data *, unsigned int, struct page *); | 1178 | struct page *new_node_page(struct dnode_of_data *, unsigned int, struct page *); |
1179 | void ra_node_page(struct f2fs_sb_info *, nid_t); | 1179 | void ra_node_page(struct f2fs_sb_info *, nid_t); |
1180 | struct page *get_node_page(struct f2fs_sb_info *, pgoff_t); | 1180 | struct page *get_node_page(struct f2fs_sb_info *, pgoff_t); |
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 1994d2e449d6..89b0bd9420cc 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c | |||
@@ -23,14 +23,13 @@ | |||
23 | 23 | ||
24 | static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode) | 24 | static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode) |
25 | { | 25 | { |
26 | struct super_block *sb = dir->i_sb; | 26 | struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb); |
27 | struct f2fs_sb_info *sbi = F2FS_SB(sb); | ||
28 | nid_t ino; | 27 | nid_t ino; |
29 | struct inode *inode; | 28 | struct inode *inode; |
30 | bool nid_free = false; | 29 | bool nid_free = false; |
31 | int err; | 30 | int err; |
32 | 31 | ||
33 | inode = new_inode(sb); | 32 | inode = new_inode(dir->i_sb); |
34 | if (!inode) | 33 | if (!inode) |
35 | return ERR_PTR(-ENOMEM); | 34 | return ERR_PTR(-ENOMEM); |
36 | 35 | ||
@@ -103,8 +102,7 @@ static inline void set_cold_files(struct f2fs_sb_info *sbi, struct inode *inode, | |||
103 | static int f2fs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 102 | static int f2fs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
104 | bool excl) | 103 | bool excl) |
105 | { | 104 | { |
106 | struct super_block *sb = dir->i_sb; | 105 | struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb); |
107 | struct f2fs_sb_info *sbi = F2FS_SB(sb); | ||
108 | struct inode *inode; | 106 | struct inode *inode; |
109 | nid_t ino = 0; | 107 | nid_t ino = 0; |
110 | int err; | 108 | int err; |
@@ -147,8 +145,7 @@ static int f2fs_link(struct dentry *old_dentry, struct inode *dir, | |||
147 | struct dentry *dentry) | 145 | struct dentry *dentry) |
148 | { | 146 | { |
149 | struct inode *inode = old_dentry->d_inode; | 147 | struct inode *inode = old_dentry->d_inode; |
150 | struct super_block *sb = dir->i_sb; | 148 | struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb); |
151 | struct f2fs_sb_info *sbi = F2FS_SB(sb); | ||
152 | int err; | 149 | int err; |
153 | 150 | ||
154 | f2fs_balance_fs(sbi); | 151 | f2fs_balance_fs(sbi); |
@@ -208,8 +205,7 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry, | |||
208 | 205 | ||
209 | static int f2fs_unlink(struct inode *dir, struct dentry *dentry) | 206 | static int f2fs_unlink(struct inode *dir, struct dentry *dentry) |
210 | { | 207 | { |
211 | struct super_block *sb = dir->i_sb; | 208 | struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb); |
212 | struct f2fs_sb_info *sbi = F2FS_SB(sb); | ||
213 | struct inode *inode = dentry->d_inode; | 209 | struct inode *inode = dentry->d_inode; |
214 | struct f2fs_dir_entry *de; | 210 | struct f2fs_dir_entry *de; |
215 | struct page *page; | 211 | struct page *page; |
@@ -243,8 +239,7 @@ fail: | |||
243 | static int f2fs_symlink(struct inode *dir, struct dentry *dentry, | 239 | static int f2fs_symlink(struct inode *dir, struct dentry *dentry, |
244 | const char *symname) | 240 | const char *symname) |
245 | { | 241 | { |
246 | struct super_block *sb = dir->i_sb; | 242 | struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb); |
247 | struct f2fs_sb_info *sbi = F2FS_SB(sb); | ||
248 | struct inode *inode; | 243 | struct inode *inode; |
249 | size_t symlen = strlen(symname) + 1; | 244 | size_t symlen = strlen(symname) + 1; |
250 | int err; | 245 | int err; |
@@ -331,8 +326,7 @@ static int f2fs_rmdir(struct inode *dir, struct dentry *dentry) | |||
331 | static int f2fs_mknod(struct inode *dir, struct dentry *dentry, | 326 | static int f2fs_mknod(struct inode *dir, struct dentry *dentry, |
332 | umode_t mode, dev_t rdev) | 327 | umode_t mode, dev_t rdev) |
333 | { | 328 | { |
334 | struct super_block *sb = dir->i_sb; | 329 | struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb); |
335 | struct f2fs_sb_info *sbi = F2FS_SB(sb); | ||
336 | struct inode *inode; | 330 | struct inode *inode; |
337 | int err = 0; | 331 | int err = 0; |
338 | 332 | ||
@@ -370,8 +364,7 @@ out: | |||
370 | static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry, | 364 | static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry, |
371 | struct inode *new_dir, struct dentry *new_dentry) | 365 | struct inode *new_dir, struct dentry *new_dentry) |
372 | { | 366 | { |
373 | struct super_block *sb = old_dir->i_sb; | 367 | struct f2fs_sb_info *sbi = F2FS_SB(old_dir->i_sb); |
374 | struct f2fs_sb_info *sbi = F2FS_SB(sb); | ||
375 | struct inode *old_inode = old_dentry->d_inode; | 368 | struct inode *old_inode = old_dentry->d_inode; |
376 | struct inode *new_inode = new_dentry->d_inode; | 369 | struct inode *new_inode = new_dentry->d_inode; |
377 | struct page *old_dir_page; | 370 | struct page *old_dir_page; |
@@ -490,8 +483,7 @@ out: | |||
490 | 483 | ||
491 | static int f2fs_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode) | 484 | static int f2fs_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode) |
492 | { | 485 | { |
493 | struct super_block *sb = dir->i_sb; | 486 | struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb); |
494 | struct f2fs_sb_info *sbi = F2FS_SB(sb); | ||
495 | struct inode *inode; | 487 | struct inode *inode; |
496 | int err; | 488 | int err; |
497 | 489 | ||
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 4b697ccc9b0c..de709f0a445e 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c | |||
@@ -845,7 +845,7 @@ void remove_inode_page(struct inode *inode) | |||
845 | truncate_node(&dn); | 845 | truncate_node(&dn); |
846 | } | 846 | } |
847 | 847 | ||
848 | struct page *new_inode_page(struct inode *inode, const struct qstr *name) | 848 | struct page *new_inode_page(struct inode *inode) |
849 | { | 849 | { |
850 | struct dnode_of_data dn; | 850 | struct dnode_of_data dn; |
851 | 851 | ||