From patchwork Wed Apr 12 07:26:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kara X-Patchwork-Id: 9676739 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C307160382 for ; Wed, 12 Apr 2017 07:26:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B518B27FA3 for ; Wed, 12 Apr 2017 07:26:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA2DE2850F; Wed, 12 Apr 2017 07:26:45 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 6714727FA3 for ; Wed, 12 Apr 2017 07:26:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753411AbdDLH0m (ORCPT ); Wed, 12 Apr 2017 03:26:42 -0400 Received: from mx2.suse.de ([195.135.220.15]:53819 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752072AbdDLH0X (ORCPT ); Wed, 12 Apr 2017 03:26:23 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BCC82AD10; Wed, 12 Apr 2017 07:26:21 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 9F59B1E31CB; Wed, 12 Apr 2017 09:26:17 +0200 (CEST) From: Jan Kara To: Cc: , , jfs-discussion@lists.sourceforge.net, Jan Kara Subject: [PATCH 09/11] reiserfs: Remove useless setting of i_flags Date: Wed, 12 Apr 2017 09:26:09 +0200 Message-Id: <20170412072611.29017-10-jack@suse.cz> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170412072611.29017-1-jack@suse.cz> References: <20170412072611.29017-1-jack@suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP reiserfs_new_inode() clears IMMUTABLE and APPEND flags from a symlink i_flags however a few lines below in sd_attrs_to_i_attrs() we will happily overwrite i_flags with whatever we inherited from the directory. Since this behavior is there for ages just remove the useless setting of i_flags. Signed-off-by: Jan Kara --- fs/reiserfs/inode.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index a6ab9d64ea1b..aeca1a0b7b5a 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c @@ -2002,10 +2002,6 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th, /* uid and gid must already be set by the caller for quota init */ - /* symlink cannot be immutable or append only, right? */ - if (S_ISLNK(inode->i_mode)) - inode->i_flags &= ~(S_IMMUTABLE | S_APPEND); - inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); inode->i_size = i_size; inode->i_blocks = 0;