All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Souptick Joarder <jrdr.linux@gmail.com>
Cc: mfasheh@versity.com, jlbec@evilplan.org, willy@infradead.org,
	ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] fs: ocfs2: Adding new return type vm_fault_t
Date: Fri, 1 Jun 2018 16:47:52 -0700	[thread overview]
Message-ID: <20180601164752.027e4f087da1b545f15c6832@linux-foundation.org> (raw)
In-Reply-To: <20180523153258.GA28451@jordon-HP-15-Notebook-PC>

On Wed, 23 May 2018 21:02:58 +0530 Souptick Joarder <jrdr.linux@gmail.com> wrote:

> Use new return type vm_fault_t for fault handler. For
> now, this is just documenting that the function returns
> a VM_FAULT value rather than an errno. Once all instances
> are converted, vm_fault_t will become a distinct type.
> 
> Ref-> commit 1c8f422059ae ("mm: change return type to vm_fault_t")
> 
> vmf_error() is the newly introduce inline function
> in 4.18.
> 
> Fix one checkpatch.pl warning by replacing BUG_ON()
> with WARN_ON()

err, no, I'll revert that part.

It could be that if this assertion triggers then filesystem corruption
would ensue, in which case a BUG_ON() is the appropriate handling. 
Such a change should be submitted separately, please.

--- a/fs/ocfs2/mmap.c~fs-ocfs2-adding-new-return-type-vm_fault_t-fix
+++ a/fs/ocfs2/mmap.c
@@ -120,7 +120,7 @@ static vm_fault_t __ocfs2_page_mkwrite(s
 		goto out;
 	}
 	err = ocfs2_write_end_nolock(mapping, pos, len, len, fsdata);
-	WARN_ON(err != len);
+	BUG_ON(err != len);
 	ret = VM_FAULT_LOCKED;
 out:
 	return ret;
_

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Souptick Joarder <jrdr.linux@gmail.com>
Cc: mfasheh@versity.com, jlbec@evilplan.org, willy@infradead.org,
	ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org
Subject: [Ocfs2-devel] [PATCH v2] fs: ocfs2: Adding new return type vm_fault_t
Date: Fri, 1 Jun 2018 16:47:52 -0700	[thread overview]
Message-ID: <20180601164752.027e4f087da1b545f15c6832@linux-foundation.org> (raw)
In-Reply-To: <20180523153258.GA28451@jordon-HP-15-Notebook-PC>

On Wed, 23 May 2018 21:02:58 +0530 Souptick Joarder <jrdr.linux@gmail.com> wrote:

> Use new return type vm_fault_t for fault handler. For
> now, this is just documenting that the function returns
> a VM_FAULT value rather than an errno. Once all instances
> are converted, vm_fault_t will become a distinct type.
> 
> Ref-> commit 1c8f422059ae ("mm: change return type to vm_fault_t")
> 
> vmf_error() is the newly introduce inline function
> in 4.18.
> 
> Fix one checkpatch.pl warning by replacing BUG_ON()
> with WARN_ON()

err, no, I'll revert that part.

It could be that if this assertion triggers then filesystem corruption
would ensue, in which case a BUG_ON() is the appropriate handling. 
Such a change should be submitted separately, please.

--- a/fs/ocfs2/mmap.c~fs-ocfs2-adding-new-return-type-vm_fault_t-fix
+++ a/fs/ocfs2/mmap.c
@@ -120,7 +120,7 @@ static vm_fault_t __ocfs2_page_mkwrite(s
 		goto out;
 	}
 	err = ocfs2_write_end_nolock(mapping, pos, len, len, fsdata);
-	WARN_ON(err != len);
+	BUG_ON(err != len);
 	ret = VM_FAULT_LOCKED;
 out:
 	return ret;
_

  parent reply	other threads:[~2018-06-01 23:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-23 15:32 [PATCH v2] fs: ocfs2: Adding new return type vm_fault_t Souptick Joarder
2018-05-30 11:40 ` Souptick Joarder
2018-06-01 23:47 ` Andrew Morton [this message]
2018-06-01 23:47   ` [Ocfs2-devel] " Andrew Morton
2018-06-02  6:16   ` Souptick Joarder
2018-06-04 23:05     ` Andrew Morton
2018-06-04 23:05       ` [Ocfs2-devel] " Andrew Morton

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=20180601164752.027e4f087da1b545f15c6832@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=jlbec@evilplan.org \
    --cc=jrdr.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfasheh@versity.com \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=willy@infradead.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.