All of lore.kernel.org
 help / color / mirror / Atom feed
From: philipp.ammann@posteo.de
To: linux-fsdevel@vger.kernel.org
Cc: Andreas Schneider <asn@cryptomilk.org>
Subject: [PATCH 1/6] Return a valid count in count_used_clusters()
Date: Wed,  9 Oct 2019 15:31:52 +0200	[thread overview]
Message-ID: <20191009133157.14028-2-philipp.ammann@posteo.de> (raw)
In-Reply-To: <20191009133157.14028-1-philipp.ammann@posteo.de>

From: Andreas Schneider <asn@cryptomilk.org>

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
---
 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;
 }
 
-- 
2.21.0


  reply	other threads:[~2019-10-09 13:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-09 13:31 [PATCH 0/6] Various exfat fixes philipp.ammann
2019-10-09 13:31 ` philipp.ammann [this message]
2019-10-09 13:31 ` [PATCH 2/6] Add missing fs_error() in sector functions philipp.ammann
2019-10-09 13:31 ` [PATCH 3/6] Check that the new path while moving a file is not too long philipp.ammann
2019-10-09 15:25   ` Gao Xiang
2019-10-09 17:45     ` Philipp Ammann
2019-10-09 13:31 ` [PATCH 4/6] Add the exfat version to the module info philipp.ammann
2019-10-09 13:31 ` [PATCH 5/6] Sync blocks on remount philipp.ammann
2019-10-09 13:31 ` [PATCH 6/6] Add device ejected to mount options philipp.ammann
2019-10-10  3:26   ` kbuild test robot
2019-10-10  3:26     ` kbuild test robot
2019-10-10  3:44   ` kbuild test robot
2019-10-10  3:44     ` kbuild test robot
2019-10-09 17:36 ` [PATCH 0/6] Various exfat fixes Nikolay Borisov
2019-10-09 17:38   ` Philipp Ammann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191009133157.14028-2-philipp.ammann@posteo.de \
    --to=philipp.ammann@posteo.de \
    --cc=asn@cryptomilk.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.