From patchwork Mon Apr 20 08:31:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ZhangZhen X-Patchwork-Id: 6240401 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8FA77BF4A6 for ; Mon, 20 Apr 2015 08:33:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B482120373 for ; Mon, 20 Apr 2015 08:33:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CCF152037F for ; Mon, 20 Apr 2015 08:33:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754610AbbDTIc6 (ORCPT ); Mon, 20 Apr 2015 04:32:58 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:38027 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751350AbbDTIbQ (ORCPT ); Mon, 20 Apr 2015 04:31:16 -0400 Received: from 172.24.2.119 (EHLO szxeml433-hub.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CMJ57427; Mon, 20 Apr 2015 16:31:11 +0800 (CST) Received: from [127.0.0.1] (10.111.68.57) by szxeml433-hub.china.huawei.com (10.82.67.210) with Microsoft SMTP Server id 14.3.158.1; Mon, 20 Apr 2015 16:31:03 +0800 Message-ID: <5534B946.9020808@huawei.com> Date: Mon, 20 Apr 2015 16:31:02 +0800 From: Zhang Zhen User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: , , , CC: linux-btrfs Subject: Fwd: [PATCH] fs/btrfs: use inode_set_flags() instead of set_mask_bits() References: <1429518517-29275-1-git-send-email-zhenzhang.zhang@huawei.com> In-Reply-To: <1429518517-29275-1-git-send-email-zhenzhang.zhang@huawei.com> X-Forwarded-Message-Id: <1429518517-29275-1-git-send-email-zhenzhang.zhang@huawei.com> X-Originating-IP: [10.111.68.57] X-CFilter-Loop: Reflected Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use inode_set_flags() instead of set_mask_bits() according to commit 5f16f3225b062 ("ext4: atomically set inode->i_flags in ext4_set_inode_flags()"). Signed-off-by: Zhang Zhen --- fs/btrfs/ioctl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 74609b9..728b487 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -149,9 +149,8 @@ void btrfs_update_iflags(struct inode *inode) if (ip->flags & BTRFS_INODE_DIRSYNC) new_fl |= S_DIRSYNC; - set_mask_bits(&inode->i_flags, - S_SYNC | S_APPEND | S_IMMUTABLE | S_NOATIME | S_DIRSYNC, - new_fl); + inode_set_flags(inode, new_fl, + S_SYNC | S_APPEND | S_IMMUTABLE | S_NOATIME | S_DIRSYNC); } /*