diff options
author | Jiro SEKIBA <jir@unicus.jp> | 2009-11-27 05:41:14 -0500 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-11-27 06:05:16 -0500 |
commit | abdb318b79d387a723af5db2aa79f812cefd0797 (patch) | |
tree | 7915b48a984df976ed639b7b0a99672e7dc049c6 | |
parent | 3534573b58fd7576d3dc8dd66a9973592ac08b2d (diff) |
nilfs2: replace mark_inode_dirty as nilfs_mark_inode_dirty
Replace mark_inode_dirty() as nilfs_mark_inode_dirty()
to reduce deep function calls.
Signed-off-by: Jiro SEKIBA <jir@unicus.jp>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
-rw-r--r-- | fs/nilfs2/dir.c | 2 | ||||
-rw-r--r-- | fs/nilfs2/inode.c | 6 | ||||
-rw-r--r-- | fs/nilfs2/namei.c | 32 |
3 files changed, 20 insertions, 20 deletions
diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c index 1d9a4e4d1286..76d803e060a9 100644 --- a/fs/nilfs2/dir.c +++ b/fs/nilfs2/dir.c | |||
@@ -548,7 +548,7 @@ got_it: | |||
548 | nilfs_commit_chunk(page, page->mapping, from, to); | 548 | nilfs_commit_chunk(page, page->mapping, from, to); |
549 | dir->i_mtime = dir->i_ctime = CURRENT_TIME; | 549 | dir->i_mtime = dir->i_ctime = CURRENT_TIME; |
550 | /* NILFS_I(dir)->i_flags &= ~NILFS_BTREE_FL; */ | 550 | /* NILFS_I(dir)->i_flags &= ~NILFS_BTREE_FL; */ |
551 | mark_inode_dirty(dir); | 551 | nilfs_mark_inode_dirty(dir); |
552 | /* OFFSET_CACHE */ | 552 | /* OFFSET_CACHE */ |
553 | out_put: | 553 | out_put: |
554 | nilfs_put_page(page); | 554 | nilfs_put_page(page); |
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index ede03752b96f..7868cc122ac7 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c | |||
@@ -97,7 +97,7 @@ int nilfs_get_block(struct inode *inode, sector_t blkoff, | |||
97 | nilfs_transaction_abort(inode->i_sb); | 97 | nilfs_transaction_abort(inode->i_sb); |
98 | goto out; | 98 | goto out; |
99 | } | 99 | } |
100 | mark_inode_dirty(inode); | 100 | nilfs_mark_inode_dirty(inode); |
101 | nilfs_transaction_commit(inode->i_sb); /* never fails */ | 101 | nilfs_transaction_commit(inode->i_sb); /* never fails */ |
102 | /* Error handling should be detailed */ | 102 | /* Error handling should be detailed */ |
103 | set_buffer_new(bh_result); | 103 | set_buffer_new(bh_result); |
@@ -598,7 +598,7 @@ void nilfs_truncate(struct inode *inode) | |||
598 | if (IS_SYNC(inode)) | 598 | if (IS_SYNC(inode)) |
599 | nilfs_set_transaction_flag(NILFS_TI_SYNC); | 599 | nilfs_set_transaction_flag(NILFS_TI_SYNC); |
600 | 600 | ||
601 | mark_inode_dirty(inode); | 601 | nilfs_mark_inode_dirty(inode); |
602 | nilfs_set_file_dirty(NILFS_SB(sb), inode, 0); | 602 | nilfs_set_file_dirty(NILFS_SB(sb), inode, 0); |
603 | nilfs_transaction_commit(sb); | 603 | nilfs_transaction_commit(sb); |
604 | /* May construct a logical segment and may fail in sync mode. | 604 | /* May construct a logical segment and may fail in sync mode. |
@@ -623,7 +623,7 @@ void nilfs_delete_inode(struct inode *inode) | |||
623 | truncate_inode_pages(&inode->i_data, 0); | 623 | truncate_inode_pages(&inode->i_data, 0); |
624 | 624 | ||
625 | nilfs_truncate_bmap(ii, 0); | 625 | nilfs_truncate_bmap(ii, 0); |
626 | mark_inode_dirty(inode); | 626 | nilfs_mark_inode_dirty(inode); |
627 | nilfs_free_inode(inode); | 627 | nilfs_free_inode(inode); |
628 | /* nilfs_free_inode() marks inode buffer dirty */ | 628 | /* nilfs_free_inode() marks inode buffer dirty */ |
629 | if (IS_SYNC(inode)) | 629 | if (IS_SYNC(inode)) |
diff --git a/fs/nilfs2/namei.c b/fs/nilfs2/namei.c index 4237722b549c..07ba838ef089 100644 --- a/fs/nilfs2/namei.c +++ b/fs/nilfs2/namei.c | |||
@@ -120,7 +120,7 @@ static int nilfs_create(struct inode *dir, struct dentry *dentry, int mode, | |||
120 | inode->i_op = &nilfs_file_inode_operations; | 120 | inode->i_op = &nilfs_file_inode_operations; |
121 | inode->i_fop = &nilfs_file_operations; | 121 | inode->i_fop = &nilfs_file_operations; |
122 | inode->i_mapping->a_ops = &nilfs_aops; | 122 | inode->i_mapping->a_ops = &nilfs_aops; |
123 | mark_inode_dirty(inode); | 123 | nilfs_mark_inode_dirty(inode); |
124 | err = nilfs_add_nondir(dentry, inode); | 124 | err = nilfs_add_nondir(dentry, inode); |
125 | } | 125 | } |
126 | if (!err) | 126 | if (!err) |
@@ -148,7 +148,7 @@ nilfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev) | |||
148 | err = PTR_ERR(inode); | 148 | err = PTR_ERR(inode); |
149 | if (!IS_ERR(inode)) { | 149 | if (!IS_ERR(inode)) { |
150 | init_special_inode(inode, inode->i_mode, rdev); | 150 | init_special_inode(inode, inode->i_mode, rdev); |
151 | mark_inode_dirty(inode); | 151 | nilfs_mark_inode_dirty(inode); |
152 | err = nilfs_add_nondir(dentry, inode); | 152 | err = nilfs_add_nondir(dentry, inode); |
153 | } | 153 | } |
154 | if (!err) | 154 | if (!err) |
@@ -201,7 +201,7 @@ out: | |||
201 | 201 | ||
202 | out_fail: | 202 | out_fail: |
203 | drop_nlink(inode); | 203 | drop_nlink(inode); |
204 | mark_inode_dirty(inode); | 204 | nilfs_mark_inode_dirty(inode); |
205 | iput(inode); | 205 | iput(inode); |
206 | goto out; | 206 | goto out; |
207 | } | 207 | } |
@@ -267,7 +267,7 @@ static int nilfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) | |||
267 | if (err) | 267 | if (err) |
268 | goto out_fail; | 268 | goto out_fail; |
269 | 269 | ||
270 | mark_inode_dirty(inode); | 270 | nilfs_mark_inode_dirty(inode); |
271 | d_instantiate(dentry, inode); | 271 | d_instantiate(dentry, inode); |
272 | out: | 272 | out: |
273 | if (!err) | 273 | if (!err) |
@@ -280,11 +280,11 @@ out: | |||
280 | out_fail: | 280 | out_fail: |
281 | drop_nlink(inode); | 281 | drop_nlink(inode); |
282 | drop_nlink(inode); | 282 | drop_nlink(inode); |
283 | mark_inode_dirty(inode); | 283 | nilfs_mark_inode_dirty(inode); |
284 | iput(inode); | 284 | iput(inode); |
285 | out_dir: | 285 | out_dir: |
286 | drop_nlink(dir); | 286 | drop_nlink(dir); |
287 | mark_inode_dirty(dir); | 287 | nilfs_mark_inode_dirty(dir); |
288 | goto out; | 288 | goto out; |
289 | } | 289 | } |
290 | 290 | ||
@@ -334,8 +334,8 @@ static int nilfs_unlink(struct inode *dir, struct dentry *dentry) | |||
334 | err = nilfs_do_unlink(dir, dentry); | 334 | err = nilfs_do_unlink(dir, dentry); |
335 | 335 | ||
336 | if (!err) { | 336 | if (!err) { |
337 | mark_inode_dirty(dir); | 337 | nilfs_mark_inode_dirty(dir); |
338 | mark_inode_dirty(dentry->d_inode); | 338 | nilfs_mark_inode_dirty(dentry->d_inode); |
339 | err = nilfs_transaction_commit(dir->i_sb); | 339 | err = nilfs_transaction_commit(dir->i_sb); |
340 | } else | 340 | } else |
341 | nilfs_transaction_abort(dir->i_sb); | 341 | nilfs_transaction_abort(dir->i_sb); |
@@ -359,9 +359,9 @@ static int nilfs_rmdir(struct inode *dir, struct dentry *dentry) | |||
359 | if (!err) { | 359 | if (!err) { |
360 | inode->i_size = 0; | 360 | inode->i_size = 0; |
361 | drop_nlink(inode); | 361 | drop_nlink(inode); |
362 | mark_inode_dirty(inode); | 362 | nilfs_mark_inode_dirty(inode); |
363 | drop_nlink(dir); | 363 | drop_nlink(dir); |
364 | mark_inode_dirty(dir); | 364 | nilfs_mark_inode_dirty(dir); |
365 | } | 365 | } |
366 | } | 366 | } |
367 | if (!err) | 367 | if (!err) |
@@ -414,12 +414,12 @@ static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
414 | goto out_dir; | 414 | goto out_dir; |
415 | inc_nlink(old_inode); | 415 | inc_nlink(old_inode); |
416 | nilfs_set_link(new_dir, new_de, new_page, old_inode); | 416 | nilfs_set_link(new_dir, new_de, new_page, old_inode); |
417 | mark_inode_dirty(new_dir); | 417 | nilfs_mark_inode_dirty(new_dir); |
418 | new_inode->i_ctime = CURRENT_TIME; | 418 | new_inode->i_ctime = CURRENT_TIME; |
419 | if (dir_de) | 419 | if (dir_de) |
420 | drop_nlink(new_inode); | 420 | drop_nlink(new_inode); |
421 | drop_nlink(new_inode); | 421 | drop_nlink(new_inode); |
422 | mark_inode_dirty(new_inode); | 422 | nilfs_mark_inode_dirty(new_inode); |
423 | } else { | 423 | } else { |
424 | if (dir_de) { | 424 | if (dir_de) { |
425 | err = -EMLINK; | 425 | err = -EMLINK; |
@@ -430,12 +430,12 @@ static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
430 | err = nilfs_add_link(new_dentry, old_inode); | 430 | err = nilfs_add_link(new_dentry, old_inode); |
431 | if (err) { | 431 | if (err) { |
432 | drop_nlink(old_inode); | 432 | drop_nlink(old_inode); |
433 | mark_inode_dirty(old_inode); | 433 | nilfs_mark_inode_dirty(old_inode); |
434 | goto out_dir; | 434 | goto out_dir; |
435 | } | 435 | } |
436 | if (dir_de) { | 436 | if (dir_de) { |
437 | inc_nlink(new_dir); | 437 | inc_nlink(new_dir); |
438 | mark_inode_dirty(new_dir); | 438 | nilfs_mark_inode_dirty(new_dir); |
439 | } | 439 | } |
440 | } | 440 | } |
441 | 441 | ||
@@ -452,8 +452,8 @@ static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
452 | nilfs_set_link(old_inode, dir_de, dir_page, new_dir); | 452 | nilfs_set_link(old_inode, dir_de, dir_page, new_dir); |
453 | drop_nlink(old_dir); | 453 | drop_nlink(old_dir); |
454 | } | 454 | } |
455 | mark_inode_dirty(old_dir); | 455 | nilfs_mark_inode_dirty(old_dir); |
456 | mark_inode_dirty(old_inode); | 456 | nilfs_mark_inode_dirty(old_inode); |
457 | 457 | ||
458 | err = nilfs_transaction_commit(old_dir->i_sb); | 458 | err = nilfs_transaction_commit(old_dir->i_sb); |
459 | return err; | 459 | return err; |