]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ocfs2-fix-readonly-issue-in-ocfs2_unlink-fix
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 27 Jun 2013 23:51:08 +0000 (09:51 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:37:18 +0000 (16:37 +1000)
cleanups

Cc: Jensen <shencanquan@huawei.com>
Cc: Jie Liu <jeff.liu@oracle.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Sunil Mushran <sunil.mushran@gmail.com>
Cc: Younger Liu <younger.liu@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ocfs2/namei.c

index 50e5409700f4f2ae4e9e4a99be06a3347611db99..f12b8a6ad481bd81ad8230570fa1a0fadc595bf8 100644 (file)
@@ -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);
        }