All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Michal Hocko <mhocko@kernel.org>, <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Michal Hocko <mhocko@suse.com>
Subject: Re: [PATCH 1/2] fs: use mapping_set_error instead of opencoded set_bit
Date: Mon, 12 Sep 2016 15:18:23 -0700	[thread overview]
Message-ID: <20160912151823.45d01e5acc44fa082c94dd2c@linux-foundation.org> (raw)
In-Reply-To: <20160912151146.9999e6b1a9b18eac61d177d2@linux-foundation.org>

On Mon, 12 Sep 2016 15:11:46 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:

> > @@ -409,7 +408,7 @@ static int afs_write_back_from_locked_page(struct afs_writeback *wb,
> >  		case -ENOMEDIUM:
> >  		case -ENXIO:
> >  			afs_kill_pages(wb->vnode, true, first, last);
> > -			set_bit(AS_EIO, &wb->vnode->vfs_inode.i_mapping->flags);
> > +			mapping_set_error(wb->vnode->vfs_inode.i_mapping, -ENXIO);
> 
> This one is a functional change: mapping_set_error() will rewrite
> -ENXIO into -EIO.  Doesn't seem at all important though.

hm, OK, it's not a functional change - the code was already doing
s/ENXIO/EIO/.

Let's make it look more truthful?

--- a/fs/afs/write.c~fs-use-mapping_set_error-instead-of-opencoded-set_bit-fix
+++ a/fs/afs/write.c
@@ -408,7 +408,7 @@ no_more:
 		case -ENOMEDIUM:
 		case -ENXIO:
 			afs_kill_pages(wb->vnode, true, first, last);
-			mapping_set_error(wb->vnode->vfs_inode.i_mapping, -ENXIO);
+			mapping_set_error(wb->vnode->vfs_inode.i_mapping, -EIO);
 			break;
 		case -EACCES:
 		case -EPERM:
_

WARNING: multiple messages have this Message-ID
From: Andrew Morton <akpm@linux-foundation.org>
To: Michal Hocko <mhocko@kernel.org>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
	Michal Hocko <mhocko@suse.com>
Subject: Re: [PATCH 1/2] fs: use mapping_set_error instead of opencoded set_bit
Date: Mon, 12 Sep 2016 15:18:23 -0700	[thread overview]
Message-ID: <20160912151823.45d01e5acc44fa082c94dd2c@linux-foundation.org> (raw)
In-Reply-To: <20160912151146.9999e6b1a9b18eac61d177d2@linux-foundation.org>

On Mon, 12 Sep 2016 15:11:46 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:

> > @@ -409,7 +408,7 @@ static int afs_write_back_from_locked_page(struct afs_writeback *wb,
> >  		case -ENOMEDIUM:
> >  		case -ENXIO:
> >  			afs_kill_pages(wb->vnode, true, first, last);
> > -			set_bit(AS_EIO, &wb->vnode->vfs_inode.i_mapping->flags);
> > +			mapping_set_error(wb->vnode->vfs_inode.i_mapping, -ENXIO);
> 
> This one is a functional change: mapping_set_error() will rewrite
> -ENXIO into -EIO.  Doesn't seem at all important though.

hm, OK, it's not a functional change - the code was already doing
s/ENXIO/EIO/.

Let's make it look more truthful?

--- a/fs/afs/write.c~fs-use-mapping_set_error-instead-of-opencoded-set_bit-fix
+++ a/fs/afs/write.c
@@ -408,7 +408,7 @@ no_more:
 		case -ENOMEDIUM:
 		case -ENXIO:
 			afs_kill_pages(wb->vnode, true, first, last);
-			mapping_set_error(wb->vnode->vfs_inode.i_mapping, -ENXIO);
+			mapping_set_error(wb->vnode->vfs_inode.i_mapping, -EIO);
 			break;
 		case -EACCES:
 		case -EPERM:
_


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2016-09-12 22:18 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-30 17:28 [PATCH -v2] mm: Don't use radix tree writeback tags for pages in swap cache Huang, Ying
2016-08-30 17:28 ` Huang, Ying
2016-08-30 18:29 ` Rik van Riel
2016-08-31  9:14 ` Mel Gorman
2016-08-31  9:14   ` Mel Gorman
2016-08-31 15:17   ` Huang, Ying
2016-08-31 15:17     ` Huang, Ying
2016-08-31 15:39     ` Mel Gorman
2016-08-31 15:39       ` Mel Gorman
2016-08-31 15:44       ` Huang, Ying
2016-08-31 15:44         ` Huang, Ying
2016-08-31 21:35       ` Andi Kleen
2016-08-31 21:35         ` Andi Kleen
2016-08-31 21:30   ` Andrew Morton
2016-08-31 21:30     ` Andrew Morton
2016-09-01  8:51     ` Mel Gorman
2016-09-01  8:51       ` Mel Gorman
2016-09-01  9:13     ` Michal Hocko
2016-09-01  9:13       ` Michal Hocko
2016-09-12 11:16       ` [PATCH 0/2] do not squash mapping flags and gfp_mask together (was: Re: [PATCH -v2] mm: Don't use radix tree writeback tags for pages in) Michal Hocko
2016-09-12 11:16         ` Michal Hocko
2016-09-12 11:16         ` [PATCH 1/2] fs: use mapping_set_error instead of opencoded set_bit Michal Hocko
2016-09-12 11:16           ` Michal Hocko
2016-09-12 22:11           ` Andrew Morton
2016-09-12 22:11             ` Andrew Morton
2016-09-12 22:18             ` Andrew Morton [this message]
2016-09-12 22:18               ` Andrew Morton
2016-09-13  6:53               ` Michal Hocko
2016-09-13  6:53                 ` Michal Hocko
2016-09-13 21:29                 ` Andrew Morton
2016-09-13 21:29                   ` Andrew Morton
2016-09-12 11:16         ` [PATCH 2/2] mm: split gfp_mask and mapping flags into separate fields Michal Hocko
2016-09-12 11:16           ` Michal Hocko
2016-09-12 11:48           ` Michal Hocko
2016-09-12 11:48             ` Michal Hocko

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=20160912151823.45d01e5acc44fa082c94dd2c@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=mhocko@suse.com \
    --subject='Re: [PATCH 1/2] fs: use mapping_set_error instead of opencoded set_bit' \
    /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

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.