|
23 | 23 |
|
24 | 24 | static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode) |
25 | 25 | { |
26 | | - struct super_block *sb = dir->i_sb; |
27 | | - struct f2fs_sb_info *sbi = F2FS_SB(sb); |
| 26 | + struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb); |
28 | 27 | nid_t ino; |
29 | 28 | struct inode *inode; |
30 | 29 | bool nid_free = false; |
31 | 30 | int err; |
32 | 31 |
|
33 | | - inode = new_inode(sb); |
| 32 | + inode = new_inode(dir->i_sb); |
34 | 33 | if (!inode) |
35 | 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 | 102 | static int f2fs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
104 | 103 | bool excl) |
105 | 104 | { |
106 | | - struct super_block *sb = dir->i_sb; |
107 | | - struct f2fs_sb_info *sbi = F2FS_SB(sb); |
| 105 | + struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb); |
108 | 106 | struct inode *inode; |
109 | 107 | nid_t ino = 0; |
110 | 108 | int err; |
@@ -147,8 +145,7 @@ static int f2fs_link(struct dentry *old_dentry, struct inode *dir, |
147 | 145 | struct dentry *dentry) |
148 | 146 | { |
149 | 147 | struct inode *inode = old_dentry->d_inode; |
150 | | - struct super_block *sb = dir->i_sb; |
151 | | - struct f2fs_sb_info *sbi = F2FS_SB(sb); |
| 148 | + struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb); |
152 | 149 | int err; |
153 | 150 |
|
154 | 151 | f2fs_balance_fs(sbi); |
@@ -208,8 +205,7 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry, |
208 | 205 |
|
209 | 206 | static int f2fs_unlink(struct inode *dir, struct dentry *dentry) |
210 | 207 | { |
211 | | - struct super_block *sb = dir->i_sb; |
212 | | - struct f2fs_sb_info *sbi = F2FS_SB(sb); |
| 208 | + struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb); |
213 | 209 | struct inode *inode = dentry->d_inode; |
214 | 210 | struct f2fs_dir_entry *de; |
215 | 211 | struct page *page; |
@@ -243,8 +239,7 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry) |
243 | 239 | static int f2fs_symlink(struct inode *dir, struct dentry *dentry, |
244 | 240 | const char *symname) |
245 | 241 | { |
246 | | - struct super_block *sb = dir->i_sb; |
247 | | - struct f2fs_sb_info *sbi = F2FS_SB(sb); |
| 242 | + struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb); |
248 | 243 | struct inode *inode; |
249 | 244 | size_t symlen = strlen(symname) + 1; |
250 | 245 | int err; |
@@ -331,8 +326,7 @@ static int f2fs_rmdir(struct inode *dir, struct dentry *dentry) |
331 | 326 | static int f2fs_mknod(struct inode *dir, struct dentry *dentry, |
332 | 327 | umode_t mode, dev_t rdev) |
333 | 328 | { |
334 | | - struct super_block *sb = dir->i_sb; |
335 | | - struct f2fs_sb_info *sbi = F2FS_SB(sb); |
| 329 | + struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb); |
336 | 330 | struct inode *inode; |
337 | 331 | int err = 0; |
338 | 332 |
|
@@ -370,8 +364,7 @@ static int f2fs_mknod(struct inode *dir, struct dentry *dentry, |
370 | 364 | static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry, |
371 | 365 | struct inode *new_dir, struct dentry *new_dentry) |
372 | 366 | { |
373 | | - struct super_block *sb = old_dir->i_sb; |
374 | | - struct f2fs_sb_info *sbi = F2FS_SB(sb); |
| 367 | + struct f2fs_sb_info *sbi = F2FS_SB(old_dir->i_sb); |
375 | 368 | struct inode *old_inode = old_dentry->d_inode; |
376 | 369 | struct inode *new_inode = new_dentry->d_inode; |
377 | 370 | struct page *old_dir_page; |
@@ -490,8 +483,7 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry, |
490 | 483 |
|
491 | 484 | static int f2fs_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode) |
492 | 485 | { |
493 | | - struct super_block *sb = dir->i_sb; |
494 | | - struct f2fs_sb_info *sbi = F2FS_SB(sb); |
| 486 | + struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb); |
495 | 487 | struct inode *inode; |
496 | 488 | int err; |
497 | 489 |
|
|
0 commit comments