* [PATCH RESEND] Ext4: No need to add inode to orphan list during hole punch
@ 2012-07-25 14:23 Ashish Sangwan
2012-07-30 2:19 ` Zheng Liu
2012-08-19 2:30 ` Theodore Ts'o
0 siblings, 2 replies; 3+ messages in thread
From: Ashish Sangwan @ 2012-07-25 14:23 UTC (permalink / raw)
To: Ted Tso
Cc: linux-kernel, linux-ext4, lczerner, a.sangwan, namjae.jeon,
Ashish Sangwan, Namjae Jeon
While performing punch hole for an inode, i_disksize is not changed.
So, there is no need to add the inode to orphan list.
Signed-off-by: Ashish Sangwan <ashish.sangwan2@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
---
fs/ext4/extents.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 91341ec..3e902f9 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4801,9 +4801,6 @@ int ext4_ext_punch_hole(struct file *file, loff_t offset, loff_t length)
if (IS_ERR(handle))
return PTR_ERR(handle);
- err = ext4_orphan_add(handle, inode);
- if (err)
- goto out;
/*
* Now we need to zero out the non-page-aligned data in the
@@ -4889,7 +4886,6 @@ int ext4_ext_punch_hole(struct file *file, loff_t offset, loff_t length)
up_write(&EXT4_I(inode)->i_data_sem);
out:
- ext4_orphan_del(handle, inode);
inode->i_mtime = inode->i_ctime = ext4_current_time(inode);
ext4_mark_inode_dirty(handle, inode);
ext4_journal_stop(handle);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND] Ext4: No need to add inode to orphan list during hole punch
2012-07-25 14:23 [PATCH RESEND] Ext4: No need to add inode to orphan list during hole punch Ashish Sangwan
@ 2012-07-30 2:19 ` Zheng Liu
2012-08-19 2:30 ` Theodore Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Zheng Liu @ 2012-07-30 2:19 UTC (permalink / raw)
To: Ashish Sangwan
Cc: Ted Tso, linux-kernel, linux-ext4, lczerner, a.sangwan,
namjae.jeon, Ashish Sangwan, Namjae Jeon
On Wed, Jul 25, 2012 at 07:53:34PM +0530, Ashish Sangwan wrote:
> While performing punch hole for an inode, i_disksize is not changed.
> So, there is no need to add the inode to orphan list.
>
> Signed-off-by: Ashish Sangwan <ashish.sangwan2@gmail.com>
> Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Acked-by: Zheng Liu <wenqing.lz@taobao.com>
Regards,
Zheng
> ---
> fs/ext4/extents.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index 91341ec..3e902f9 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -4801,9 +4801,6 @@ int ext4_ext_punch_hole(struct file *file, loff_t offset, loff_t length)
> if (IS_ERR(handle))
> return PTR_ERR(handle);
>
> - err = ext4_orphan_add(handle, inode);
> - if (err)
> - goto out;
>
> /*
> * Now we need to zero out the non-page-aligned data in the
> @@ -4889,7 +4886,6 @@ int ext4_ext_punch_hole(struct file *file, loff_t offset, loff_t length)
> up_write(&EXT4_I(inode)->i_data_sem);
>
> out:
> - ext4_orphan_del(handle, inode);
> inode->i_mtime = inode->i_ctime = ext4_current_time(inode);
> ext4_mark_inode_dirty(handle, inode);
> ext4_journal_stop(handle);
> --
> 1.7.10.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND] Ext4: No need to add inode to orphan list during hole punch
2012-07-25 14:23 [PATCH RESEND] Ext4: No need to add inode to orphan list during hole punch Ashish Sangwan
2012-07-30 2:19 ` Zheng Liu
@ 2012-08-19 2:30 ` Theodore Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Theodore Ts'o @ 2012-08-19 2:30 UTC (permalink / raw)
To: Ashish Sangwan
Cc: linux-kernel, linux-ext4, lczerner, a.sangwan, namjae.jeon,
Ashish Sangwan, Namjae Jeon
On Wed, Jul 25, 2012 at 07:53:34PM +0530, Ashish Sangwan wrote:
> While performing punch hole for an inode, i_disksize is not changed.
> So, there is no need to add the inode to orphan list.
>
> Signed-off-by: Ashish Sangwan <ashish.sangwan2@gmail.com>
> Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Thanks, applied.
- Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-08-19 2:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-25 14:23 [PATCH RESEND] Ext4: No need to add inode to orphan list during hole punch Ashish Sangwan
2012-07-30 2:19 ` Zheng Liu
2012-08-19 2:30 ` Theodore Ts'o
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).