From: Miklos Szeredi <miklos@szeredi.hu>
To: viro@ZenIV.linux.org.uk
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
hch@infradead.org, akpm@linux-foundation.org
Subject: [patch 1/5] vfs: truncate: dont check immutable twice
Date: Tue, 24 Jun 2008 16:50:12 +0200 [thread overview]
Message-ID: <20080624145042.623178221@szeredi.hu> (raw)
In-Reply-To: <20080624145011.722691277@szeredi.hu>
[-- Attachment #1: vfs-truncate-dont-check-immutable-twice.patch --]
[-- Type: text/plain, Size: 787 bytes --]
From: Miklos Szeredi <mszeredi@suse.cz>
vfs_permission(MAY_WRITE) already checked for the inode being
immutable, so no need to repeat it.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Acked-by: Christoph Hellwig <hch@infradead.org>
---
fs/open.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/fs/open.c
===================================================================
--- linux-2.6.orig/fs/open.c 2008-06-11 10:16:13.000000000 +0200
+++ linux-2.6/fs/open.c 2008-06-13 13:15:01.000000000 +0200
@@ -254,7 +254,7 @@ static long do_sys_truncate(const char _
goto mnt_drop_write_and_out;
error = -EPERM;
- if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
+ if (IS_APPEND(inode))
goto mnt_drop_write_and_out;
error = get_write_access(inode);
--
next prev parent reply other threads:[~2008-06-24 14:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-24 14:50 [patch 0/5] vfs: cleanups Miklos Szeredi
2008-06-24 14:50 ` Miklos Szeredi [this message]
2008-06-24 14:50 ` [patch 2/5] vfs: create file_truncate() helper Miklos Szeredi
2008-06-24 14:50 ` [patch 3/5] vfs: change remove_suid() to file_remove_suid() Miklos Szeredi
2008-06-24 14:50 ` [patch 4/5] vfs: reuse local variable in vfs_link() Miklos Szeredi
2008-06-24 14:50 ` [patch 5/5] vfs: remove mode parameter from vfs_symlink() Miklos Szeredi
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=20080624145042.623178221@szeredi.hu \
--to=miklos@szeredi.hu \
--cc=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.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®