mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [EXPERIMENT] Add new "flush" option
Date: Mon, 26 Dec 2005 01:02:52 +0900	[thread overview]
Message-ID: <87bqz588r7.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <20051225041900.38fdcba7.akpm@osdl.org> (Andrew Morton's message of "Sun, 25 Dec 2005 04:19:00 -0800")

I was missing the following part. Sorry.

Andrew Morton <akpm@osdl.org> writes:

> You can use filp->f_mapping here, remove the inode* argument.

Ah, I see. However, it is intended to use as ->release() handler.
So, I updated the patch as following.

+int fs_flush_sync_fdata(struct inode *inode, struct file *filp)
+{
+	int err = 0;
+
+	if (IS_FLUSH(inode) && filp->f_mode & FMODE_WRITE) {
+		current->flags |= PF_SYNCWRITE;
+		err = filemap_write_and_wait(filp->f_mapping);
+		current->flags &= ~PF_SYNCWRITE;
+	}
+	return err;
+}
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

      parent reply	other threads:[~2005-12-25 16:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-24 20:04 OGAWA Hirofumi
2005-12-25 12:19 ` Andrew Morton
2005-12-25 14:23   ` OGAWA Hirofumi
2005-12-25 23:05     ` Andrew Morton
2005-12-26 16:37       ` OGAWA Hirofumi
2005-12-26 19:00         ` OGAWA Hirofumi
2005-12-25 16:02   ` OGAWA Hirofumi [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=87bqz588r7.fsf@devron.myhome.or.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.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 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®