Re: [PATCH v2] Check for immutable flag in fallocate path

2011-03-14 Thread Christoph Hellwig
On Fri, Mar 04, 2011 at 08:39:03AM +1100, Dave Chinner wrote: WTF? Why does append mode have any effect on whether we can punch holes in a file or not? There's no justification for adding this in the commit message. Why is it even in a patch that is for checking immutable inodes? What is the

Re: [PATCH v2] Check for immutable flag in fallocate path

2011-03-14 Thread Marco Stornelli
2011/3/14 Christoph Hellwig h...@infradead.org: On Fri, Mar 04, 2011 at 08:39:03AM +1100, Dave Chinner wrote: WTF?  Why does append mode have any effect on whether we can punch holes in a file or not? There's no justification for adding this in the commit message. Why is it even in a patch

Re: [PATCH v2] Check for immutable flag in fallocate path

2011-03-04 Thread Marco Stornelli
Hi Dave, Il 03/03/2011 22:39, Dave Chinner ha scritto: WTF? Why does append mode have any effect on whether we can punch holes in a file or not? There's no justification for adding this in the commit message. Why is it even in a patch that is for checking immutable inodes? What is the point

[PATCH v2] Check for immutable flag in fallocate path

2011-03-03 Thread Marco Stornelli
From: Marco Stornelli marco.storne...@gmail.com All fs must check for the immutable flag in their fallocate callback. It's possible to have a race condition in this scenario: an application open a file in read/write and it does something, meanwhile root set the immutable flag on the file, the

Re: [PATCH v2] Check for immutable flag in fallocate path

2011-03-03 Thread Dave Chinner
On Thu, Mar 03, 2011 at 09:42:27AM +0100, Marco Stornelli wrote: From: Marco Stornelli marco.storne...@gmail.com All fs must check for the immutable flag in their fallocate callback. It's possible to have a race condition in this scenario: an application open a file in read/write and it does