diff options
Diffstat (limited to 'fs/ext2/inode.c')
-rw-r--r-- | fs/ext2/inode.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index 940c96168868..40ad210a5049 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c | |||
@@ -458,7 +458,7 @@ failed_out: | |||
458 | * the same format as ext2_get_branch() would do. We are calling it after | 458 | * the same format as ext2_get_branch() would do. We are calling it after |
459 | * we had read the existing part of chain and partial points to the last | 459 | * we had read the existing part of chain and partial points to the last |
460 | * triple of that (one with zero ->key). Upon the exit we have the same | 460 | * triple of that (one with zero ->key). Upon the exit we have the same |
461 | * picture as after the successful ext2_get_block(), excpet that in one | 461 | * picture as after the successful ext2_get_block(), except that in one |
462 | * place chain is disconnected - *branch->p is still zero (we did not | 462 | * place chain is disconnected - *branch->p is still zero (we did not |
463 | * set the last link), but branch->key contains the number that should | 463 | * set the last link), but branch->key contains the number that should |
464 | * be placed into *branch->p to fill that gap. | 464 | * be placed into *branch->p to fill that gap. |
@@ -662,7 +662,7 @@ static int ext2_get_blocks(struct inode *inode, | |||
662 | mutex_lock(&ei->truncate_mutex); | 662 | mutex_lock(&ei->truncate_mutex); |
663 | /* | 663 | /* |
664 | * If the indirect block is missing while we are reading | 664 | * If the indirect block is missing while we are reading |
665 | * the chain(ext3_get_branch() returns -EAGAIN err), or | 665 | * the chain(ext2_get_branch() returns -EAGAIN err), or |
666 | * if the chain has been changed after we grab the semaphore, | 666 | * if the chain has been changed after we grab the semaphore, |
667 | * (either because another process truncated this branch, or | 667 | * (either because another process truncated this branch, or |
668 | * another get_block allocated this branch) re-grab the chain to see if | 668 | * another get_block allocated this branch) re-grab the chain to see if |
@@ -1203,7 +1203,7 @@ static int ext2_setsize(struct inode *inode, loff_t newsize) | |||
1203 | inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC; | 1203 | inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC; |
1204 | if (inode_needs_sync(inode)) { | 1204 | if (inode_needs_sync(inode)) { |
1205 | sync_mapping_buffers(inode->i_mapping); | 1205 | sync_mapping_buffers(inode->i_mapping); |
1206 | ext2_sync_inode (inode); | 1206 | sync_inode_metadata(inode, 1); |
1207 | } else { | 1207 | } else { |
1208 | mark_inode_dirty(inode); | 1208 | mark_inode_dirty(inode); |
1209 | } | 1209 | } |
@@ -1523,15 +1523,6 @@ int ext2_write_inode(struct inode *inode, struct writeback_control *wbc) | |||
1523 | return __ext2_write_inode(inode, wbc->sync_mode == WB_SYNC_ALL); | 1523 | return __ext2_write_inode(inode, wbc->sync_mode == WB_SYNC_ALL); |
1524 | } | 1524 | } |
1525 | 1525 | ||
1526 | int ext2_sync_inode(struct inode *inode) | ||
1527 | { | ||
1528 | struct writeback_control wbc = { | ||
1529 | .sync_mode = WB_SYNC_ALL, | ||
1530 | .nr_to_write = 0, /* sys_fsync did this */ | ||
1531 | }; | ||
1532 | return sync_inode(inode, &wbc); | ||
1533 | } | ||
1534 | |||
1535 | int ext2_setattr(struct dentry *dentry, struct iattr *iattr) | 1526 | int ext2_setattr(struct dentry *dentry, struct iattr *iattr) |
1536 | { | 1527 | { |
1537 | struct inode *inode = dentry->d_inode; | 1528 | struct inode *inode = dentry->d_inode; |