From: Andrew Morton Date: Thu, 27 Jun 2013 23:51:08 +0000 (+1000) Subject: ocfs2-fix-readonly-issue-in-ocfs2_unlink-fix X-Git-Tag: next-20130628~3^2~629 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7dd22820bbcce6f82ca78e709f3050b63d1f1826;p=karo-tx-linux.git ocfs2-fix-readonly-issue-in-ocfs2_unlink-fix cleanups Cc: Jensen Cc: Jie Liu Cc: Joel Becker Cc: Mark Fasheh Cc: Sunil Mushran Cc: Younger Liu Signed-off-by: Andrew Morton --- diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 50e5409700f4..f12b8a6ad481 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -790,7 +790,8 @@ static int ocfs2_unlink(struct inode *dir, struct dentry *dentry) { int status; - int child_locked = 0, is_unlinkable = 0; + int child_locked = 0; + bool is_unlinkable = false; struct inode *inode = dentry->d_inode; struct inode *orphan_dir = NULL; struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); @@ -873,7 +874,7 @@ static int ocfs2_unlink(struct inode *dir, mlog_errno(status); goto leave; } - is_unlinkable = 1; + is_unlinkable = true; } handle = ocfs2_start_trans(osb, ocfs2_unlink_credits(osb->sb)); @@ -919,8 +920,8 @@ static int ocfs2_unlink(struct inode *dir, } if (is_unlinkable) { - status = ocfs2_orphan_add(osb, handle, inode, fe_bh, orphan_name, - &orphan_insert, orphan_dir); + status = ocfs2_orphan_add(osb, handle, inode, fe_bh, + orphan_name, &orphan_insert, orphan_dir); if (status < 0) mlog_errno(status); }