From patchwork Wed Oct 9 13:31:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Ammann X-Patchwork-Id: 11181215 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D561B76 for ; Wed, 9 Oct 2019 13:40:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B6DF6218AC for ; Wed, 9 Oct 2019 13:40:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=posteo.de header.i=@posteo.de header.b="KEFipBZ5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731331AbfJINkO (ORCPT ); Wed, 9 Oct 2019 09:40:14 -0400 Received: from mout02.posteo.de ([185.67.36.66]:43773 "EHLO mout02.posteo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731234AbfJINkN (ORCPT ); Wed, 9 Oct 2019 09:40:13 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 143072400FC for ; Wed, 9 Oct 2019 15:32:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1570627927; bh=plU/GfgV967eLyEzwZya4nodnB+xNb/gF0tf3BfvIwM=; h=From:To:Cc:Subject:Date:From; b=KEFipBZ5KNskKclsLQSNcQqqL6+y4196RiqhTnXg+aSXBGhS9gdxtHeJxv0vysJQ9 5rxFwOBR675zvK7qFVF3atCV4KP4fS+kPwC6PnqC+6A+acPHnV6SeSjnjN1Bzi4xKW GZyn8gJN4nqB+xX8ydoeq2+3fFdXl5qq7TY+9uYTwpk4U6PswQsRbQLIc5a0/TvNJP 0OEOj7uBQZ88U8kcmV6Tc7+PaXz94h5fbEptD7E7ptN0+7Fqsiow1OMVQL/Z6Mze18 B291yUX13ofHApbakOIVrxX0gBG1r1afeRUyE1qC+y2tC8yKotFwnaxS+dn5hnar7Z LPws8yG7Xjk0g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 46pFWB5Nbbz9rxK; Wed, 9 Oct 2019 15:32:06 +0200 (CEST) From: philipp.ammann@posteo.de To: linux-fsdevel@vger.kernel.org Cc: Andreas Schneider Subject: [PATCH 1/6] Return a valid count in count_used_clusters() Date: Wed, 9 Oct 2019 15:31:52 +0200 Message-Id: <20191009133157.14028-2-philipp.ammann@posteo.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191009133157.14028-1-philipp.ammann@posteo.de> References: <20191009133157.14028-1-philipp.ammann@posteo.de> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org From: Andreas Schneider Signed-off-by: Andreas Schneider --- drivers/staging/exfat/exfat_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/exfat/exfat_core.c b/drivers/staging/exfat/exfat_core.c index b3e9cf725cf5..eef9e2726b6b 100644 --- a/drivers/staging/exfat/exfat_core.c +++ b/drivers/staging/exfat/exfat_core.c @@ -482,6 +482,9 @@ s32 exfat_count_used_clusters(struct super_block *sb) } } + if ((p_fs->num_clusters - 2) < (s32)count) + count = p_fs->num_clusters - 2; + return count; } From patchwork Wed Oct 9 13:31:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Ammann X-Patchwork-Id: 11181213 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9E98F1864 for ; Wed, 9 Oct 2019 13:40:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7FEE721920 for ; Wed, 9 Oct 2019 13:40:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=posteo.de header.i=@posteo.de header.b="TgIQtB0a" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731316AbfJINkN (ORCPT ); Wed, 9 Oct 2019 09:40:13 -0400 Received: from mout02.posteo.de ([185.67.36.66]:54023 "EHLO mout02.posteo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731083AbfJINkN (ORCPT ); Wed, 9 Oct 2019 09:40:13 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 35EAF2400E5 for ; Wed, 9 Oct 2019 15:32:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1570627927; bh=pGVw1jADD7c9qH3moiLEWEhmMWcXL4w0BUxz1XKY8Iw=; h=From:To:Cc:Subject:Date:From; b=TgIQtB0alRDA3I1Uisxau1tr7mghmFwkivJhLjTu5nXxIrV3Xv1on8uwPtY2v6d23 G4a5MDr0/DxtzwvmmSlZfJaLGdcevMDYjWxE+3pMmeby3j2iKc+4/rb2pNew8TtM0h ysHr+vHqdZ06uHE+bgxVUSKEk03Suup+XuR04zcTDWhqpmyRMTo1xUWQzPp7GDzwxj vDBqX7+e1GQHy8WKDQUsj1taksCkUPYH+G8DUfm7Z2Euupnx4u1ByXKzZ8LvInQS+X wzV6ziDd+JBAcWwzqfOo4kWGxBt0rszrzATFqYb/CSu6KDx8Fq0A+NKeUKOQAHEXLw Xz+VIZ8vMNymA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 46pFWB6bxLz9rxM; Wed, 9 Oct 2019 15:32:06 +0200 (CEST) From: philipp.ammann@posteo.de To: linux-fsdevel@vger.kernel.org Cc: Andreas Schneider Subject: [PATCH 2/6] Add missing fs_error() in sector functions Date: Wed, 9 Oct 2019 15:31:53 +0200 Message-Id: <20191009133157.14028-3-philipp.ammann@posteo.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191009133157.14028-1-philipp.ammann@posteo.de> References: <20191009133157.14028-1-philipp.ammann@posteo.de> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org From: Andreas Schneider Signed-off-by: Andreas Schneider --- drivers/staging/exfat/exfat_core.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/staging/exfat/exfat_core.c b/drivers/staging/exfat/exfat_core.c index eef9e2726b6b..043091565578 100644 --- a/drivers/staging/exfat/exfat_core.c +++ b/drivers/staging/exfat/exfat_core.c @@ -3616,8 +3616,10 @@ int sector_read(struct super_block *sb, sector_t sec, struct buffer_head **bh, if (!p_fs->dev_ejected) { ret = bdev_read(sb, sec, bh, 1, read); - if (ret != FFS_SUCCESS) + if (ret != FFS_SUCCESS) { + fs_error(sb); p_fs->dev_ejected = 1; + } } return ret; @@ -3645,8 +3647,10 @@ int sector_write(struct super_block *sb, sector_t sec, struct buffer_head *bh, if (!p_fs->dev_ejected) { ret = bdev_write(sb, sec, bh, 1, sync); - if (ret != FFS_SUCCESS) + if (ret != FFS_SUCCESS) { + fs_error(sb); p_fs->dev_ejected = 1; + } } return ret; @@ -3668,8 +3672,10 @@ int multi_sector_read(struct super_block *sb, sector_t sec, if (!p_fs->dev_ejected) { ret = bdev_read(sb, sec, bh, num_secs, read); - if (ret != FFS_SUCCESS) + if (ret != FFS_SUCCESS) { + fs_error(sb); p_fs->dev_ejected = 1; + } } return ret; @@ -3696,8 +3702,10 @@ int multi_sector_write(struct super_block *sb, sector_t sec, if (!p_fs->dev_ejected) { ret = bdev_write(sb, sec, bh, num_secs, sync); - if (ret != FFS_SUCCESS) + if (ret != FFS_SUCCESS) { + fs_error(sb); p_fs->dev_ejected = 1; + } } return ret; From patchwork Wed Oct 9 13:31:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Ammann X-Patchwork-Id: 11181223 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E1AEB76 for ; Wed, 9 Oct 2019 13:40:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B8574218DE for ; Wed, 9 Oct 2019 13:40:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=posteo.de header.i=@posteo.de header.b="FxMOzmOZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731340AbfJINkQ (ORCPT ); Wed, 9 Oct 2019 09:40:16 -0400 Received: from mout02.posteo.de ([185.67.36.66]:42505 "EHLO mout02.posteo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731293AbfJINkO (ORCPT ); Wed, 9 Oct 2019 09:40:14 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 58861240100 for ; Wed, 9 Oct 2019 15:32:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1570627927; bh=Iwg5/9KBuQdylE3CE5fdVfFc4CNvlOD+2Jrd/IUhVYY=; h=From:To:Cc:Subject:Date:From; b=FxMOzmOZcUOWsWC4tInheRglsIOHz08/4niPEUM7YvrWiMjFQVPacvkMH30iTd8wk TTgamawL8LUQg+WANOlEVG3N/wRAVnQoohFp8VMO1uwBhj/QPY6jR+Vr0xi5Jnrnds AriEhJMFpC0lxQci6GtiyArSF8wUfTQbY06CIVpkUcv6L79/aHeoCxKp0GxPIW2bln LhU9x51NAvH6Q1aD1i+LDbKBfu21txDPlo1b/A9wuhb4sjMy5v8Fxs8wfASSvBStaB PGXSNwp+wrAwubdC8soWIKfGkHqDECTmA+5jDRFePYkzqXlKCL2xpSHCBV2GweZfTg 5mi7KAzjgY0UA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 46pFWC0R5dz9rxN; Wed, 9 Oct 2019 15:32:07 +0200 (CEST) From: philipp.ammann@posteo.de To: linux-fsdevel@vger.kernel.org Cc: Andreas Schneider Subject: [PATCH 3/6] Check that the new path while moving a file is not too long Date: Wed, 9 Oct 2019 15:31:54 +0200 Message-Id: <20191009133157.14028-4-philipp.ammann@posteo.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191009133157.14028-1-philipp.ammann@posteo.de> References: <20191009133157.14028-1-philipp.ammann@posteo.de> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org From: Andreas Schneider Signed-off-by: Andreas Schneider --- drivers/staging/exfat/exfat_super.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c index 5f6caee819a6..b63186a67af6 100644 --- a/drivers/staging/exfat/exfat_super.c +++ b/drivers/staging/exfat/exfat_super.c @@ -1300,6 +1300,9 @@ static int ffsMoveFile(struct inode *old_parent_inode, struct file_id_t *fid, } /* check the validity of directory name in the given new pathname */ + if (strlen(new_path) >= MAX_NAME_LENGTH) + return FFS_NAMETOOLONG; + ret = resolve_path(new_parent_inode, new_path, &newdir, &uni_name); if (ret) goto out2; From patchwork Wed Oct 9 13:31:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Ammann X-Patchwork-Id: 11181219 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6C32E13BD for ; Wed, 9 Oct 2019 13:40:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 42845218AC for ; Wed, 9 Oct 2019 13:40:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=posteo.de header.i=@posteo.de header.b="a6x0QA8u" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731335AbfJINkP (ORCPT ); Wed, 9 Oct 2019 09:40:15 -0400 Received: from mout02.posteo.de ([185.67.36.66]:51195 "EHLO mout02.posteo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731229AbfJINkN (ORCPT ); Wed, 9 Oct 2019 09:40:13 -0400 X-Greylist: delayed 484 seconds by postgrey-1.27 at vger.kernel.org; Wed, 09 Oct 2019 09:40:12 EDT Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 826D62400E6 for ; Wed, 9 Oct 2019 15:32:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1570627927; bh=m1/aV5A6az2PrkSkWyiglNpzQzGx1aqO/iE3sRko5/Q=; h=From:To:Cc:Subject:Date:From; b=a6x0QA8uQU/FPIAgkhBGrjtbIQlpwYM5i6T8JPx7Uu1NN8JXkPRaKoT1CY1tyz72A rAiygLBWnxcT2M1gkG9qW1cwswzCHs7R9giMerfnMwpDvTheTSSsiZXmZG8E2cPS8K jhfI6Ins++9pLsI6ViGp37sw7ls0psBgQ+w1w20ofqjDxfOFT7WSk0HJE46lkZ9VVy yCZ5OxIRUjI5sMClSuamq52S1zrBd2yefRqGE9Y+0BWWclwz1T6t1wAfMB6MklDXuO qUSh/4+L9eqdnAQoUWsDH76l4h//jeTNb4rQHX4kGu+WKyBpMyiAnN0/Ky3wfL6Ugj ICTlVoXMuFcig== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 46pFWC1QhMz9rxM; Wed, 9 Oct 2019 15:32:07 +0200 (CEST) From: philipp.ammann@posteo.de To: linux-fsdevel@vger.kernel.org Cc: Andreas Schneider Subject: [PATCH 4/6] Add the exfat version to the module info Date: Wed, 9 Oct 2019 15:31:55 +0200 Message-Id: <20191009133157.14028-5-philipp.ammann@posteo.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191009133157.14028-1-philipp.ammann@posteo.de> References: <20191009133157.14028-1-philipp.ammann@posteo.de> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org From: Andreas Schneider Signed-off-by: Andreas Schneider --- drivers/staging/exfat/exfat_super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c index b63186a67af6..29fb5e88fe5f 100644 --- a/drivers/staging/exfat/exfat_super.c +++ b/drivers/staging/exfat/exfat_super.c @@ -4049,4 +4049,5 @@ module_exit(exit_exfat); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("exFAT Filesystem Driver"); +MODULE_VERSION(EXFAT_VERSION); MODULE_ALIAS_FS("exfat"); From patchwork Wed Oct 9 13:31:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Ammann X-Patchwork-Id: 11181211 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 43A5913BD for ; Wed, 9 Oct 2019 13:40:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 23C3C21920 for ; Wed, 9 Oct 2019 13:40:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=posteo.de header.i=@posteo.de header.b="JhHaI9Wh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731267AbfJINkN (ORCPT ); Wed, 9 Oct 2019 09:40:13 -0400 Received: from mout02.posteo.de ([185.67.36.66]:37167 "EHLO mout02.posteo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731259AbfJINkN (ORCPT ); Wed, 9 Oct 2019 09:40:13 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id AB6322400FC for ; Wed, 9 Oct 2019 15:32:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1570627927; bh=v156KLmsetNeSmsA507OqKATkLkxlImkcFjRxUoOgT8=; h=From:To:Cc:Subject:Date:From; b=JhHaI9WhkFwDSD5yV8abEdqNutaTWTgiFnob60Tog3CGdMI+Q557R/PCI1ou3ykuq AKF7yuEH1OO/TlnuUg9G8E6nVmXPgAMcFH5eSCqFESLi0mDhB8RVYYZzxCBY7rl5im Yq1NblTH74VqJ068ezsCLiPNqNpdsk/CcdMKRWo/tQUV2upbELDRWpb2W88tDQihyl +4rGTCNAD1MUc4x6zlGsACM5Lk42pdGw46AFaq2iEl8/bSrN9XGK6ub02D6gP1K9T1 ip135V8YbX+hTbAgYTUjDeAkrD5OcmpQtpqxVUpipf9vMuXHu8YnKi0V8H1sKquA2G UEcZmxxRCZqnA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 46pFWC2gcTz9rxN; Wed, 9 Oct 2019 15:32:07 +0200 (CEST) From: philipp.ammann@posteo.de To: linux-fsdevel@vger.kernel.org Cc: Andreas Schneider Subject: [PATCH 5/6] Sync blocks on remount Date: Wed, 9 Oct 2019 15:31:56 +0200 Message-Id: <20191009133157.14028-6-philipp.ammann@posteo.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191009133157.14028-1-philipp.ammann@posteo.de> References: <20191009133157.14028-1-philipp.ammann@posteo.de> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org From: Andreas Schneider Signed-off-by: Andreas Schneider --- drivers/staging/exfat/exfat_super.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c index 29fb5e88fe5f..e8e481a5ddc9 100644 --- a/drivers/staging/exfat/exfat_super.c +++ b/drivers/staging/exfat/exfat_super.c @@ -3532,6 +3532,8 @@ static int exfat_statfs(struct dentry *dentry, struct kstatfs *buf) static int exfat_remount(struct super_block *sb, int *flags, char *data) { *flags |= SB_NODIRATIME; + sync_filesystem(sb); + return 0; } From patchwork Wed Oct 9 13:31:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Ammann X-Patchwork-Id: 11181221 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5DE2A13BD for ; Wed, 9 Oct 2019 13:40:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 32CAD218AC for ; Wed, 9 Oct 2019 13:40:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=posteo.de header.i=@posteo.de header.b="qPNPV9WO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731339AbfJINkQ (ORCPT ); Wed, 9 Oct 2019 09:40:16 -0400 Received: from mout02.posteo.de ([185.67.36.66]:53005 "EHLO mout02.posteo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731259AbfJINkO (ORCPT ); Wed, 9 Oct 2019 09:40:14 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id CB6E12400FF for ; Wed, 9 Oct 2019 15:32:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1570627927; bh=qi8nNlBgU2FQhwXxuF04700QnQlYmpHyq5Gu24vhgcE=; h=From:To:Cc:Subject:Date:From; b=qPNPV9WOJZcKbIeZwjcrEHyDl5hiHaEPK7LmelSLdFAUa13lBwB1ioyl5tlbA1JOd rdGODtzDRnnyDDVX3dt491MSWopYKs5DUmCVHMoW4Rf5Cg+B4r7eqWpTy5lLRilkW+ caiTmPF3WuW6Jfj6r02TCg/w7Y+ZNpZfVH7ZSJxnc6qVB2lNCja89f8BpLYOjw3jKh ZxX3JRwbgmYKi5jJlbi/t8RZ8TfjEAnIPCdkIp9Kn4ajBezuiQc61b4AsojgF+w62w Bvj6KkahxMdfohCMONCmt1/Nxe0tCnue5p1AchMI8QXu4+DBmUZ5tkjmyhqVzlY5At yAPJGvXi6zR1Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 46pFWC3vj7z9rxM; Wed, 9 Oct 2019 15:32:07 +0200 (CEST) From: philipp.ammann@posteo.de To: linux-fsdevel@vger.kernel.org Cc: Andreas Schneider Subject: [PATCH 6/6] Add device ejected to mount options Date: Wed, 9 Oct 2019 15:31:57 +0200 Message-Id: <20191009133157.14028-7-philipp.ammann@posteo.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191009133157.14028-1-philipp.ammann@posteo.de> References: <20191009133157.14028-1-philipp.ammann@posteo.de> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org From: Andreas Schneider Signed-off-by: Andreas Schneider --- drivers/staging/exfat/exfat_super.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c index e8e481a5ddc9..d97616351159 100644 --- a/drivers/staging/exfat/exfat_super.c +++ b/drivers/staging/exfat/exfat_super.c @@ -3541,6 +3541,7 @@ static int exfat_show_options(struct seq_file *m, struct dentry *root) { struct exfat_sb_info *sbi = EXFAT_SB(root->d_sb); struct exfat_mount_options *opts = &sbi->options; + FS_INFO_T *p_fs = &(sbi->fs_info); if (__kuid_val(opts->fs_uid)) seq_printf(m, ",uid=%u", __kuid_val(opts->fs_uid)); @@ -3565,6 +3566,8 @@ static int exfat_show_options(struct seq_file *m, struct dentry *root) if (opts->discard) seq_puts(m, ",discard"); #endif + if (p_fs->dev_ejected) + seq_puts(m, ",ejected"); return 0; }