linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 1/2] btrfs: Use NAME_MAX to replace intermediate number of BTRFS_NAME_LEN
Date: Tue, 25 Sep 2018 08:06:25 +0800	[thread overview]
Message-ID: <20180925000626.15474-1-wqu@suse.com> (raw)

Since we're following the name size limit of linux, just use NAME_MAX.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 fs/btrfs/ctree.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 53af9f5253f4..5ab6d1f6e055 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -65,7 +65,7 @@ struct btrfs_ordered_sum;
  * we can actually store much bigger names, but lets not confuse the rest
  * of linux
  */
-#define BTRFS_NAME_LEN 255
+#define BTRFS_NAME_LEN NAME_MAX
 
 /*
  * Theoretical limit is larger, but we keep this down to a sane
-- 
2.19.0

             reply	other threads:[~2018-09-25  6:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-25  0:06 Qu Wenruo [this message]
2018-09-25  0:06 ` [PATCH 2/2] btrfs: tree-checker: Avoid using max() for stack array allocation Qu Wenruo
2018-09-25 15:34   ` David Sterba
2018-09-26  0:19     ` Qu Wenruo
2018-09-25  1:03 ` [PATCH 1/2] btrfs: Use NAME_MAX to replace intermediate number of BTRFS_NAME_LEN Su Yue
2018-09-25 15:29 ` David Sterba

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=20180925000626.15474-1-wqu@suse.com \
    --to=wqu@suse.com \
    --cc=linux-btrfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).