From patchwork Sat Apr 20 11:48:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 10910299 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4A68D17EE for ; Sat, 20 Apr 2019 11:49:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B507289A3 for ; Sat, 20 Apr 2019 11:49:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2F1BC28D97; Sat, 20 Apr 2019 11:49:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3F87289EA for ; Sat, 20 Apr 2019 11:49:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728188AbfDTLtR (ORCPT ); Sat, 20 Apr 2019 07:49:17 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:40332 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727977AbfDTLtQ (ORCPT ); Sat, 20 Apr 2019 07:49:16 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x3KBn39v057534 for ; Sat, 20 Apr 2019 11:49:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2018-07-02; bh=W8i+l7hsY21hE/yjxGeXW8Jb94nnEWUtYIXW3GMiAFw=; b=XTdTqZMk+3RglWPfYdZjZ8pRFdbhpAVPTYLq4oo35XDhiDDkKRZ+UzPeUSA0edeEy8xh QjXnrpwf/lYrqePa7sQu243YTntJv1ZAKbFB+zB45hIAuwMzpRSIwYpgSjGs5WnS2zfn gCh5JmAVxf0jL970OhW6CB4jZPbM9zv5TB+F/wDdZ/S/TtIQsFuxY+KkQ3h+XrnOuuEc EURSGyO9uSgzmWz36v/6PoEhG8Duk+Yq/oaI6PP6bV4aN5v+2fd5zIZz+mAoheRaDPQx N78LJo6/VqZurtrb+BElctUliYtLmfIWov+qBTFtB3L04nRZU4NTH2sLFVyfigzuxSTS sg== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 2ryv2prrjv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 20 Apr 2019 11:49:15 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x3KBn8PX002540 for ; Sat, 20 Apr 2019 11:49:15 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 2ryrhqxf59-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 20 Apr 2019 11:49:15 +0000 Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x3KBnE32022342 for ; Sat, 20 Apr 2019 11:49:14 GMT Received: from localhost.localdomain (/116.87.143.221) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 20 Apr 2019 04:49:14 -0700 From: Anand Jain To: linux-btrfs@vger.kernel.org Subject: [PATCH 04/10] btrfs: drop useless inode i_flags copy and restore Date: Sat, 20 Apr 2019 19:48:54 +0800 Message-Id: <20190420114900.15472-5-anand.jain@oracle.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20190420114900.15472-1-anand.jain@oracle.com> References: <20190420114900.15472-1-anand.jain@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9232 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904200090 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9232 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904200090 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The patch (btrfs: start transaction in btrfs_ioctl_setflags()) used btrfs_set_prop() instead of btrfs_set_prop_trans() by which now the inode::i_flags update functions such as btrfs_sync_inode_flags_to_i_flags() and btrfs_update_inode() is called in btrfs_ioctl_setflags() instead of btrfs_set_prop_trans()->btrfs_setxattr() as earlier. So the inode::i_flags remains unmodified until the thread has checked all the conditions. So drop the saved inode::i_flags in out_i_flags. Signed-off-by: Anand Jain --- fs/btrfs/ioctl.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index fc3f75c9a210..1834b576d1cb 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -190,7 +190,6 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg) unsigned int fsflags, old_fsflags; int ret; u64 old_flags; - unsigned int old_i_flags; umode_t mode; const char *comp = NULL; @@ -214,7 +213,6 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg) inode_lock(inode); old_flags = binode->flags; - old_i_flags = inode->i_flags; mode = inode->i_mode; fsflags = btrfs_mask_fsflags_for_type(inode, fsflags); @@ -335,7 +333,6 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg) out_drop: if (ret) { binode->flags = old_flags; - inode->i_flags = old_i_flags; } out_unlock: