From: Christoph Hellwig <hch@lst.de>
To: xfs@oss.sgi.com
Subject: Re: [PATCH][mainline-only] remove useless mnt_want_write call in xfs_write
Date: Mon, 29 Sep 2008 09:44:50 +0200 [thread overview]
Message-ID: <20080929074450.GB23785@lst.de> (raw)
In-Reply-To: <20080814212551.GA20980@lst.de>
Any chance to get this into the git tree for the first 2.6.28 pull?
On Thu, Aug 14, 2008 at 11:25:51PM +0200, Christoph Hellwig wrote:
> When mnt_want_write was introduced a call to it was added around
> xfs_ichgtime, but there is no need for this because a file can't be open
> read/write on a r/o mount, and a mount can't degrade r/o while we still
> have files open for writing. As the mnt_want_write changes were never
> merged into the CVS tree this patch is for mainline only.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> --- linux-2.6/fs/xfs/linux-2.6/xfs_lrw.c 2008-08-14 14:52:15.000000000 -0300
> +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c 2008-08-14 14:54:53.000000000 -0300
> @@ -51,7 +51,6 @@
> #include "xfs_vnodeops.h"
>
> #include <linux/capability.h>
> -#include <linux/mount.h>
> #include <linux/writeback.h>
>
>
> @@ -668,15 +667,8 @@ start:
> if (new_size > xip->i_size)
> xip->i_new_size = new_size;
>
> - /*
> - * We're not supposed to change timestamps in readonly-mounted
> - * filesystems. Throw it away if anyone asks us.
> - */
> - if (likely(!(ioflags & IO_INVIS) &&
> - !mnt_want_write(file->f_path.mnt))) {
> + if (likely(!(ioflags & IO_INVIS)))
> xfs_ichgtime(xip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG);
> - mnt_drop_write(file->f_path.mnt);
> - }
>
> /*
> * If the offset is beyond the size of the file, we have a couple
---end quoted text---
next parent reply other threads:[~2008-09-29 7:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080814212551.GA20980@lst.de>
2008-09-29 7:44 ` Christoph Hellwig [this message]
2008-11-10 13:31 ` [PATCH][mainline-only] remove useless mnt_want_write call in xfs_write Christoph Hellwig
2008-12-01 22:20 ` Christoph Hellwig
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=20080929074450.GB23785@lst.de \
--to=hch@lst.de \
--cc=xfs@oss.sgi.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