linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] F2FS: Fix the logic of IS_DNODE()
@ 2013-04-07 16:57 Zhihui Zhang
  2013-04-08  6:17 ` Jaegeuk Kim
  0 siblings, 1 reply; 2+ messages in thread
From: Zhihui Zhang @ 2013-04-07 16:57 UTC (permalink / raw)
  To: jaegeuk.kim; +Cc: linux-f2fs-devel, linux-kernel, Zhihui Zhang

Signed-off-by: Zhihui Zhang <zzhsuny@gmail.com>
---
 fs/f2fs/node.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h
index afdb130..2be47b2 100644
--- a/fs/f2fs/node.h
+++ b/fs/f2fs/node.h
@@ -239,7 +239,7 @@ static inline bool IS_DNODE(struct page *node_page)
 		return false;
 	if (ofs >= 6 + 2 * NIDS_PER_BLOCK) {
 		ofs -= 6 + 2 * NIDS_PER_BLOCK;
-		if ((long int)ofs % (NIDS_PER_BLOCK + 1))
+		if (!((long int)ofs % (NIDS_PER_BLOCK + 1)))
 			return false;
 	}
 	return true;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] F2FS: Fix the logic of IS_DNODE()
  2013-04-07 16:57 [PATCH] F2FS: Fix the logic of IS_DNODE() Zhihui Zhang
@ 2013-04-08  6:17 ` Jaegeuk Kim
  0 siblings, 0 replies; 2+ messages in thread
From: Jaegeuk Kim @ 2013-04-08  6:17 UTC (permalink / raw)
  To: Zhihui Zhang; +Cc: linux-f2fs-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 721 bytes --]

Hi,

2013-04-07 (일), 12:57 -0400, Zhihui Zhang:
> Signed-off-by: Zhihui Zhang <zzhsuny@gmail.com>
> ---
>  fs/f2fs/node.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h
> index afdb130..2be47b2 100644
> --- a/fs/f2fs/node.h
> +++ b/fs/f2fs/node.h
> @@ -239,7 +239,7 @@ static inline bool IS_DNODE(struct page *node_page)
>  		return false;
>  	if (ofs >= 6 + 2 * NIDS_PER_BLOCK) {
>  		ofs -= 6 + 2 * NIDS_PER_BLOCK;
> -		if ((long int)ofs % (NIDS_PER_BLOCK + 1))
> +		if (!((long int)ofs % (NIDS_PER_BLOCK + 1)))

Great catch!
I'll apply this.
Thank you.

>  			return false;
>  	}
>  	return true;

-- 
Jaegeuk Kim
Samsung


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-08  6:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-07 16:57 [PATCH] F2FS: Fix the logic of IS_DNODE() Zhihui Zhang
2013-04-08  6:17 ` Jaegeuk Kim

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).