* [PATCH] hostfs: fix a not needed double check
@ 2012-10-20 10:02 Marco Stornelli
2012-11-18 8:59 ` Marco Stornelli
0 siblings, 1 reply; 5+ messages in thread
From: Marco Stornelli @ 2012-10-20 10:02 UTC (permalink / raw)
To: Richard Weinberger
Cc: Jeff Dike, user-mode-linux-devel, linux-kernel, Christoph Hellwig,
Linux FS Devel
With the commit 3be2be0a32c18b0fd6d623cda63174a332ca0de1 we removed vmtruncate,
but actaully there is no need to call inode_newsize_ok() because the checks are
already done in inode_change_ok() at the begin of the function.
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
---
fs/hostfs/hostfs_kern.c | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index 457addc..c9d5254 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -845,15 +845,8 @@ int hostfs_setattr(struct dentry *dentry, struct iattr *attr)
return err;
if ((attr->ia_valid & ATTR_SIZE) &&
- attr->ia_size != i_size_read(inode)) {
- int error;
-
- error = inode_newsize_ok(inode, attr->ia_size);
- if (error)
- return error;
-
+ attr->ia_size != i_size_read(inode))
truncate_setsize(inode, attr->ia_size);
- }
setattr_copy(inode, attr);
mark_inode_dirty(inode);
--
1.7.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] hostfs: fix a not needed double check
2012-10-20 10:02 [PATCH] hostfs: fix a not needed double check Marco Stornelli
@ 2012-11-18 8:59 ` Marco Stornelli
2012-11-24 9:02 ` Marco Stornelli
0 siblings, 1 reply; 5+ messages in thread
From: Marco Stornelli @ 2012-11-18 8:59 UTC (permalink / raw)
To: Richard Weinberger
Cc: Jeff Dike, user-mode-linux-devel, linux-kernel, Christoph Hellwig,
Linux FS Devel
Il 20/10/2012 12:02, Marco Stornelli ha scritto:
> With the commit 3be2be0a32c18b0fd6d623cda63174a332ca0de1 we removed vmtruncate,
> but actaully there is no need to call inode_newsize_ok() because the checks are
> already done in inode_change_ok() at the begin of the function.
>
> Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
> ---
> fs/hostfs/hostfs_kern.c | 9 +--------
> 1 files changed, 1 insertions(+), 8 deletions(-)
>
> diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
> index 457addc..c9d5254 100644
> --- a/fs/hostfs/hostfs_kern.c
> +++ b/fs/hostfs/hostfs_kern.c
> @@ -845,15 +845,8 @@ int hostfs_setattr(struct dentry *dentry, struct iattr *attr)
> return err;
>
> if ((attr->ia_valid & ATTR_SIZE) &&
> - attr->ia_size != i_size_read(inode)) {
> - int error;
> -
> - error = inode_newsize_ok(inode, attr->ia_size);
> - if (error)
> - return error;
> -
> + attr->ia_size != i_size_read(inode))
> truncate_setsize(inode, attr->ia_size);
> - }
>
> setattr_copy(inode, attr);
> mark_inode_dirty(inode);
>
Any feedback for this patch?
Marco
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] hostfs: fix a not needed double check
2012-11-18 8:59 ` Marco Stornelli
@ 2012-11-24 9:02 ` Marco Stornelli
2012-11-24 9:12 ` Richard Weinberger
0 siblings, 1 reply; 5+ messages in thread
From: Marco Stornelli @ 2012-11-24 9:02 UTC (permalink / raw)
To: Linus Torvalds
Cc: Richard Weinberger, Jeff Dike, user-mode-linux-devel,
linux-kernel, Christoph Hellwig, Linux FS Devel
Il 18/11/2012 09:59, Marco Stornelli ha scritto:
> Il 20/10/2012 12:02, Marco Stornelli ha scritto:
>> With the commit 3be2be0a32c18b0fd6d623cda63174a332ca0de1 we removed
>> vmtruncate,
>> but actaully there is no need to call inode_newsize_ok() because the
>> checks are
>> already done in inode_change_ok() at the begin of the function.
>>
>> Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
I didn't receive any feedback from Weinberger, could you consider this
patch for next -rc?
Thanks.
Marco
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] hostfs: fix a not needed double check
2012-11-24 9:12 ` Richard Weinberger
@ 2012-11-24 9:08 ` Marco Stornelli
0 siblings, 0 replies; 5+ messages in thread
From: Marco Stornelli @ 2012-11-24 9:08 UTC (permalink / raw)
To: Richard Weinberger
Cc: Linus Torvalds, Jeff Dike, user-mode-linux-devel, linux-kernel,
Christoph Hellwig, Linux FS Devel
Il 24/11/2012 10:12, Richard Weinberger ha scritto:
> Am Sat, 24 Nov 2012 10:02:32 +0100
> schrieb Marco Stornelli <marco.stornelli@gmail.com>:
>
>> Il 18/11/2012 09:59, Marco Stornelli ha scritto:
>>> Il 20/10/2012 12:02, Marco Stornelli ha scritto:
>>>> With the commit 3be2be0a32c18b0fd6d623cda63174a332ca0de1 we removed
>>>> vmtruncate,
>>>> but actaully there is no need to call inode_newsize_ok() because
>>>> the checks are
>>>> already done in inode_change_ok() at the begin of the function.
>>>>
>>>> Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
>>
>> I didn't receive any feedback from Weinberger, could you consider
>> this patch for next -rc?
>
> Whoops. Sorry. -ENOMAL.
>
> I can carry this patch through uml.git
>
> Thanks,
> //richard
>
No problem, thanks :)
Marco
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] hostfs: fix a not needed double check
2012-11-24 9:02 ` Marco Stornelli
@ 2012-11-24 9:12 ` Richard Weinberger
2012-11-24 9:08 ` Marco Stornelli
0 siblings, 1 reply; 5+ messages in thread
From: Richard Weinberger @ 2012-11-24 9:12 UTC (permalink / raw)
To: Marco Stornelli
Cc: Linus Torvalds, Jeff Dike, user-mode-linux-devel, linux-kernel,
Christoph Hellwig, Linux FS Devel
Am Sat, 24 Nov 2012 10:02:32 +0100
schrieb Marco Stornelli <marco.stornelli@gmail.com>:
> Il 18/11/2012 09:59, Marco Stornelli ha scritto:
> > Il 20/10/2012 12:02, Marco Stornelli ha scritto:
> >> With the commit 3be2be0a32c18b0fd6d623cda63174a332ca0de1 we removed
> >> vmtruncate,
> >> but actaully there is no need to call inode_newsize_ok() because
> >> the checks are
> >> already done in inode_change_ok() at the begin of the function.
> >>
> >> Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
>
> I didn't receive any feedback from Weinberger, could you consider
> this patch for next -rc?
Whoops. Sorry. -ENOMAL.
I can carry this patch through uml.git
Thanks,
//richard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-11-24 9:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-20 10:02 [PATCH] hostfs: fix a not needed double check Marco Stornelli
2012-11-18 8:59 ` Marco Stornelli
2012-11-24 9:02 ` Marco Stornelli
2012-11-24 9:12 ` Richard Weinberger
2012-11-24 9:08 ` Marco Stornelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).