mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Carsten Otte <cotte@de.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org, schwidefsky@de.ibm.com,
	akpm@osdl.org, Christoph Hellwig <hch@infradead.org>
Subject: [RFC/PATCH 4/4] madvice/fadvice: execute in place (3rd version)
Date: Mon, 23 May 2005 19:30:42 +0200	[thread overview]
Message-ID: <1116869442.12153.34.camel@cotte.boeblingen.de.ibm.com> (raw)
In-Reply-To: <1116866094.12153.12.camel@cotte.boeblingen.de.ibm.com>

[RFC/PATCH 4/4] madvice/fadvice: execute in place (3rd version)

Make sys_madvice/fadvice return sane with xip. Patch is unchanged from
previous version.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
--- 
diff -ruN linux-git/mm/fadvise.c linux-git-xip/mm/fadvise.c
--- linux-git/mm/fadvise.c	2005-05-23 13:51:17.000000000 +0200
+++ linux-git-xip/mm/fadvise.c	2005-05-23 17:55:49.000000000 +0200
@@ -43,6 +43,10 @@
 		goto out;
 	}
 
+	if (mapping->a_ops->get_xip_page)
+		/* no bad return value, but ignore advice */
+		goto out;
+
 	/* Careful about overflows. Len == 0 means "as much as possible" */
 	endbyte = offset + len;
 	if (!len || endbyte < len)
diff -ruN linux-git/mm/madvise.c linux-git-xip/mm/madvise.c
--- linux-git/mm/madvise.c	2005-05-23 13:51:17.000000000 +0200
+++ linux-git-xip/mm/madvise.c	2005-05-23 17:55:49.000000000 +0200
@@ -65,6 +65,10 @@
 	if (!file)
 		return -EBADF;
 
+	if (file->f_mapping->a_ops->get_xip_page)
+		/* no bad return value, but ignore advice */
+		return 0;
+
 	start = ((start - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
 	if (end > vma->vm_end)
 		end = vma->vm_end;



      parent reply	other threads:[~2005-05-23 17:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1116866094.12153.12.camel@cotte.boeblingen.de.ibm.com>
2005-05-23 17:30 ` [RFC/PATCH 2/4] fs/mm: " Carsten Otte
2005-05-24  9:30   ` Suparna Bhattacharya
2005-05-24 10:28     ` Jörn Engel
2005-05-24 11:09     ` Carsten Otte
2005-05-24 13:32       ` Suparna Bhattacharya
2005-05-24 14:34         ` Carsten Otte
2005-05-25 17:51           ` Badari Pulavarty
2005-05-26 13:22             ` Suparna Bhattacharya
2005-05-26 13:19               ` Carsten Otte
2005-05-26 16:43                 ` Badari Pulavarty
2005-05-26 13:29             ` Carsten Otte
2005-05-28  9:05             ` Christoph Hellwig
2005-05-24 17:01     ` Carsten Otte
2005-05-28  9:08       ` Christoph Hellwig
2005-05-23 17:30 ` [RFC/PATCH 3/4] ext2: " Carsten Otte
2005-05-23 17:30 ` Carsten Otte [this message]

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=1116869442.12153.34.camel@cotte.boeblingen.de.ibm.com \
    --to=cotte@de.ibm.com \
    --cc=akpm@osdl.org \
    --cc=cotte@freenet.de \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwidefsky@de.ibm.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

all inboxes | Powered by JetHome®