Linux-EROFS Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: hsiangkao@aol.com (Gao Xiang)
Subject: [PREVIEW] [PATCH chao/erofs-dev 1/3] staging: erofs: harden inode lookup for 32-bit platforms
Date: Mon, 1 Oct 2018 12:26:27 +0800	[thread overview]
Message-ID: <9db17a38-8f62-2057-e040-5b0d5dd579bb@aol.com> (raw)
In-Reply-To: <ffcc88b5-bb18-047a-6dcd-639bf8647890@kernel.org>

Hi Chao

On 2018/10/1 11:04, Chao Yu wrote:
>>  /* inode.c */
>> +static inline unsigned long erofs_inode_hash(erofs_nid_t nid)
>> +{
>> +	u64 h = nid;
> unsigned long h;
> 
>> +
>> +#if BITS_PER_LONG == 32
>> +	h = (h >> 32) ^ (h & 0xffffffff);
> h = (nid >> 32) ^ (nid & 0xffffffff);
> 
>> +#endif
>> +	return (unsigned long)h;

inode hash could be wrong in 64-bit since h is not initialized.
I will fix it in another way.

Thanks,
Gao Xiang.

  reply	other threads:[~2018-10-01  4:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-21  3:43 [PREVIEW] [PATCH chao/erofs-dev 1/3] staging: erofs: harden inode lookup for 32-bit platforms Gao Xiang
2018-09-21  3:43 ` [PREVIEW] [PATCH chao/erofs-dev 2/3] staging: erofs: fix race when the managed cache is enabled Gao Xiang
2018-10-01  9:49   ` Chao Yu
2018-10-01 11:37     ` Gao Xiang
2018-10-22  9:36     ` [PATCH v2 " Gao Xiang
2018-10-22  9:51     ` [PATCH chao/erofs-dev] staging: erofs: add a full barrier in erofs_workgroup_unfreeze Gao Xiang
2018-09-21  3:43 ` [PREVIEW] [PATCH chao/erofs-dev 3/3] staging: erofs: managed pages could be locked at the time of decompression Gao Xiang
2018-10-01 10:03   ` Chao Yu
2018-09-30 16:22 ` [PREVIEW] [PATCH chao/erofs-dev 1/3] staging: erofs: harden inode lookup for 32-bit platforms Gao Xiang
2018-10-01  0:37   ` Chao Yu
2018-10-01  2:08     ` Gao Xiang
2018-10-01 10:25       ` Chao Yu
2018-10-01 11:25         ` Gao Xiang
2018-10-01  1:57 ` Chao Yu
2018-10-01  2:40   ` Gao Xiang
2018-10-01  3:04     ` Chao Yu
2018-10-01  4:26       ` Gao Xiang [this message]
2018-10-01  4:32         ` [PREVIEW][PATCH v2 chao/erofs-dev] " Gao Xiang
2018-10-01  5:24           ` Chao Yu

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=9db17a38-8f62-2057-e040-5b0d5dd579bb@aol.com \
    --to=hsiangkao@aol.com \
    /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