From 7dd22820bbcce6f82ca78e709f3050b63d1f1826 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 28 Jun 2013 09:51:08 +1000 Subject: [PATCH] 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 --- fs/ocfs2/namei.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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); } -- 2.39.5