From patchwork Thu Nov 23 19:34:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikulas Patocka X-Patchwork-Id: 10073293 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 1818D60375 for ; Thu, 23 Nov 2017 19:50:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08209294DE for ; Thu, 23 Nov 2017 19:50:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EDF2629915; Thu, 23 Nov 2017 19:50:07 +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 342B1294DE for ; Thu, 23 Nov 2017 19:50:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753313AbdKWTuF (ORCPT ); Thu, 23 Nov 2017 14:50:05 -0500 Received: from 109-183-129-149.tmcz.cz ([109.183.129.149]:34972 "EHLO leontynka.twibright.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753311AbdKWTuE (ORCPT ); Thu, 23 Nov 2017 14:50:04 -0500 X-Greylist: delayed 921 seconds by postgrey-1.27 at vger.kernel.org; Thu, 23 Nov 2017 14:50:04 EST Received: from mikulas (helo=localhost) by leontynka.twibright.com with local-esmtp (Exim 4.80) (envelope-from ) id 1eHxGi-0008HA-Ui; Thu, 23 Nov 2017 20:34:40 +0100 Date: Thu, 23 Nov 2017 20:34:40 +0100 (CET) From: Mikulas Patocka X-X-Sender: mikulas@leontynka To: Linus Torvalds cc: linux-fsdevel@vger.kernel.org Subject: [PATCH] hpfs: don't bother with the i_version counter or f_version Message-ID: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 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 From: Jeff Layton HPFS does not set SB_I_VERSION and does not use the i_version counter internally. Signed-off-by: Jeff Layton Signed-off-by: Mikulas Patocka Reviewed-by: Mikulas Patocka --- fs/hpfs/dir.c | 1 - fs/hpfs/dnode.c | 2 -- fs/hpfs/super.c | 1 - 3 files changed, 4 deletions(-) diff --git a/fs/hpfs/dir.c b/fs/hpfs/dir.c index fa6bbb4f509f..cc0193891347 100644 --- a/fs/hpfs/dir.c +++ b/fs/hpfs/dir.c @@ -149,7 +149,6 @@ static int hpfs_readdir(struct file *file, struct dir_context *ctx) if (unlikely(ret < 0)) goto out; ctx->pos = ((loff_t) hpfs_de_as_down_as_possible(inode->i_sb, hpfs_inode->i_dno) << 4) + 1; - file->f_version = inode->i_version; } next_pos = ctx->pos; if (!(de = map_pos_dirent(inode, &next_pos, &qbh))) { diff --git a/fs/hpfs/dnode.c b/fs/hpfs/dnode.c index 86ab7e790b4e..454acb0a009a 100644 --- a/fs/hpfs/dnode.c +++ b/fs/hpfs/dnode.c @@ -418,7 +418,6 @@ int hpfs_add_dirent(struct inode *i, c = 1; goto ret; } - i->i_version++; c = hpfs_add_to_dnode(i, dno, name, namelen, new_de, 0); ret: return c; @@ -725,7 +724,6 @@ int hpfs_remove_dirent(struct inode *i, dnode_secno dno, struct hpfs_dirent *de, return 2; } } - i->i_version++; for_all_poss(i, hpfs_pos_del, (t = get_pos(dnode, de)) + 1, 1); hpfs_delete_de(i->i_sb, dnode, de); hpfs_mark_4buffers_dirty(qbh); diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c index 1516fb4e28f4..5b2d84a719ef 100644 --- a/fs/hpfs/super.c +++ b/fs/hpfs/super.c @@ -235,7 +235,6 @@ static struct inode *hpfs_alloc_inode(struct super_block *sb) ei = kmem_cache_alloc(hpfs_inode_cachep, GFP_NOFS); if (!ei) return NULL; - ei->vfs_inode.i_version = 1; return &ei->vfs_inode; }