public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] reiserfs: discard prealloc in reiserfs_delete_inode
@ 2008-07-08 18:37 Jeff Mahoney
  2008-07-11 19:18 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Mahoney @ 2008-07-08 18:37 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton
  Cc: Linux Kernel Mailing List, ReiserFS Mailing List

 With the removal of struct file from the xattr code, reiserfs_file_release()
 isn't used anymore, so the prealloc isn't discarded. This causes hangs
 later down the line.

 This patch adds it to reiserfs_delete_inode. In most cases it will be
 a no-op due to it already having been called, but will avoid hangs with xattrs.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
 fs/reiserfs/inode.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -45,6 +45,8 @@ void reiserfs_delete_inode(struct inode
 			goto out;
 		reiserfs_update_inode_transaction(inode);
 
+		reiserfs_discard_prealloc(&th, inode);
+
 		err = reiserfs_delete_object(&th, inode);
 
 		/* Do quota update inside a transaction for journaled quotas. We must do that

-- 
Jeff Mahoney
SUSE Labs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] reiserfs: discard prealloc in reiserfs_delete_inode
  2008-07-08 18:37 [PATCH] reiserfs: discard prealloc in reiserfs_delete_inode Jeff Mahoney
@ 2008-07-11 19:18 ` Andrew Morton
  2008-07-11 19:23   ` Jeff Mahoney
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2008-07-11 19:18 UTC (permalink / raw)
  To: Jeff Mahoney
  Cc: Linus Torvalds, Linux Kernel Mailing List, ReiserFS Mailing List

On Tue, 08 Jul 2008 14:37:06 -0400 Jeff Mahoney <jeffm@suse.com> wrote:

>  With the removal of struct file from the xattr code, reiserfs_file_release()
>  isn't used anymore, so the prealloc isn't discarded. This causes hangs
>  later down the line.
> 
>  This patch adds it to reiserfs_delete_inode. In most cases it will be
>  a no-op due to it already having been called, but will avoid hangs with xattrs.
> 
> Signed-off-by: Jeff Mahoney <jeffm@suse.com>
> ---
>  fs/reiserfs/inode.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- a/fs/reiserfs/inode.c
> +++ b/fs/reiserfs/inode.c
> @@ -45,6 +45,8 @@ void reiserfs_delete_inode(struct inode
>  			goto out;
>  		reiserfs_update_inode_transaction(inode);
>  
> +		reiserfs_discard_prealloc(&th, inode);
> +
>  		err = reiserfs_delete_object(&th, inode);
>  
>  		/* Do quota update inside a transaction for journaled quotas. We must do that

Can you please remind us when "the removal of struct file from the xattr
code" happened?

Because hangs aren't good, and 2.6.25 might want this.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] reiserfs: discard prealloc in reiserfs_delete_inode
  2008-07-11 19:18 ` Andrew Morton
@ 2008-07-11 19:23   ` Jeff Mahoney
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Mahoney @ 2008-07-11 19:23 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linus Torvalds, Linux Kernel Mailing List, ReiserFS Mailing List,
	Greg KH

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew Morton wrote:
> On Tue, 08 Jul 2008 14:37:06 -0400 Jeff Mahoney <jeffm@suse.com> wrote:
> 
>>  With the removal of struct file from the xattr code, reiserfs_file_release()
>>  isn't used anymore, so the prealloc isn't discarded. This causes hangs
>>  later down the line.
>>
>>  This patch adds it to reiserfs_delete_inode. In most cases it will be
>>  a no-op due to it already having been called, but will avoid hangs with xattrs.
>>
>> Signed-off-by: Jeff Mahoney <jeffm@suse.com>
>> ---
>>  fs/reiserfs/inode.c |    2 ++
>>  1 file changed, 2 insertions(+)
>>
>> --- a/fs/reiserfs/inode.c
>> +++ b/fs/reiserfs/inode.c
>> @@ -45,6 +45,8 @@ void reiserfs_delete_inode(struct inode
>>  			goto out;
>>  		reiserfs_update_inode_transaction(inode);
>>  
>> +		reiserfs_discard_prealloc(&th, inode);
>> +
>>  		err = reiserfs_delete_object(&th, inode);
>>  
>>  		/* Do quota update inside a transaction for journaled quotas. We must do that
> 
> Can you please remind us when "the removal of struct file from the xattr
> code" happened?
> 
> Because hangs aren't good, and 2.6.25 might want this.

You're right. It was added in 2.6.25-rc7. I'll ping Greg about including
it in the stable tree.

- -Jeff

- --
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iEYEARECAAYFAkh3szkACgkQLPWxlyuTD7IOyACZAd0+kO4D+bPjx1W1pX/APgl+
eKgAoJ75yKu/IlmHxvlmyWM5DThyKCQL
=BLAB
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-07-11 19:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-08 18:37 [PATCH] reiserfs: discard prealloc in reiserfs_delete_inode Jeff Mahoney
2008-07-11 19:18 ` Andrew Morton
2008-07-11 19:23   ` Jeff Mahoney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox