On Wed, Aug 26, 2015 at 03:11:21PM -0700, Andrew Morton wrote:
> From: jiangyiwen <jiangyi...@huawei.com>
> Subject: ocfs2: set filesytem read-only when ocfs2_delete_entry failed.
> 
> In ocfs2_rename, it will lead to an inode with two entried(old and new) if
> ocfs2_delete_entry(old) failed.  Thus, filesystem will be inconsistent.
> 
> The case is described below:
> 
> ocfs2_rename
>     -> ocfs2_start_trans
>     -> ocfs2_add_entry(new)
>     -> ocfs2_delete_entry(old)
>         -> __ocfs2_journal_access *failed* because of -ENOMEM
>     -> ocfs2_commit_trans
> 
> So filesystem should be set to read-only at the moment.
> 
> Signed-off-by: Yiwen Jiang <jiangyi...@huawei.com>
> Cc: Joseph Qi <joseph...@huawei.com>
> Cc: Joel Becker <jl...@evilplan.org>
> Cc: Mark Fasheh <mfas...@suse.com>
> Signed-off-by: Andrew Morton <a...@linux-foundation.org>
Reviewed-by: Mark Fasheh <mfas...@suse.de>

--
Mark Fasheh

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

Reply via email to