linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] f2fs: fix omitting to update inode page
@ 2013-08-26 12:28 Jaegeuk Kim
  2013-08-27  4:50 ` Gu Zheng
  0 siblings, 1 reply; 2+ messages in thread
From: Jaegeuk Kim @ 2013-08-26 12:28 UTC (permalink / raw)
  Cc: Jaegeuk Kim, linux-fsdevel, linux-kernel, linux-f2fs-devel

The f2fs_set_link updates its parent inode number, so we should sync this to
the inode block.
Otherwise, the data can be lost after sudden-power-off.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
---
 fs/f2fs/namei.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 4e47518..9e90d31 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -447,6 +447,7 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry,
 		else
 			release_orphan_inode(sbi);
 
+		update_inode_page(old_inode):
 		update_inode_page(new_inode);
 	} else {
 		err = f2fs_add_link(new_dentry, old_inode);
-- 
1.8.3.1.437.g0dbd812


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] f2fs: fix omitting to update inode page
  2013-08-26 12:28 [PATCH] f2fs: fix omitting to update inode page Jaegeuk Kim
@ 2013-08-27  4:50 ` Gu Zheng
  0 siblings, 0 replies; 2+ messages in thread
From: Gu Zheng @ 2013-08-27  4:50 UTC (permalink / raw)
  To: Jaegeuk Kim

On 08/26/2013 08:28 PM, Jaegeuk Kim wrote:

> The f2fs_set_link updates its parent inode number, so we should sync this to
> the inode block.
> Otherwise, the data can be lost after sudden-power-off.
> 
> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
> ---
>  fs/f2fs/namei.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
> index 4e47518..9e90d31 100644
> --- a/fs/f2fs/namei.c
> +++ b/fs/f2fs/namei.c
> @@ -447,6 +447,7 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry,
>  		else
>  			release_orphan_inode(sbi);
>  
> +		update_inode_page(old_inode):

':' --> ';'

>  		update_inode_page(new_inode);
>  	} else {
>  		err = f2fs_add_link(new_dentry, old_inode);



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-27  4:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-26 12:28 [PATCH] f2fs: fix omitting to update inode page Jaegeuk Kim
2013-08-27  4:50 ` Gu Zheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).