mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Andrew Morton <akpm@osdl.org>,
	Al Viro <viro@parcelfarce.linux.theplanet.co.uk>,
	Linux Kernel ML <linux-kernel@vger.kernel.org>
Subject: Re: [Patch 6/6] Bind Mount Extensions 0.06
Date: Wed, 23 Feb 2005 23:06:59 +0000	[thread overview]
Message-ID: <20050223230659.GE21383@infradead.org> (raw)
In-Reply-To: <20050222121333.GG3682@mail.13thfloor.at>

> +++ linux-2.6.11-rc4-bme0.06-bm0.01-at0.01-cc0.01-co0.01-xa0.01-ro0.01/fs/ext2/ioctl.c	2005-02-19 06:32:05 +0100
> @@ -29,7 +29,8 @@ int ext2_ioctl (struct inode * inode, st
>  	case EXT2_IOC_SETFLAGS: {
>  		unsigned int oldflags;
>  
> -		if (IS_RDONLY(inode))
> +		if (IS_RDONLY(inode) ||
> +			(filp && MNT_IS_RDONLY(filp->f_vfsmnt)))

doing this in every filesystem ->ioctl is a really bad idea.  We need to
add common handling for ext2-style file attributes first.

Also please add a file_readonly() helper - when introduced it only checks
IS_RDONLY(file->f_dentry->d_inode) and once you add per-mount flags it
only needs to be added in a single place. Actually probably a lowelevel
one taking inode,vfsmount and wrappers for a struct file * or
struct nameidata * which would cover most of the cases.


  parent reply	other threads:[~2005-02-23 23:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-22 12:13 Herbert Poetzl
2005-02-22 14:34 ` Trond Myklebust
2005-02-22 14:44   ` Herbert Poetzl
2005-02-22 14:58 ` Trond Myklebust
2005-02-23 20:00   ` Herbert Poetzl
2005-02-23 23:06 ` Christoph Hellwig [this message]
2005-02-24 21:29   ` Herbert Poetzl

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=20050223230659.GE21383@infradead.org \
    --to=hch@infradead.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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®