linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: remove useless ext4_pin_inode()
@ 2019-02-27  2:20 Jason Yan
  2019-03-04  1:31 ` Jason Yan
  0 siblings, 1 reply; 5+ messages in thread
From: Jason Yan @ 2019-02-27  2:20 UTC (permalink / raw)
  To: tytso, adilger.kernel, linux-ext4; +Cc: Jason Yan

This function is never used from the beginning. Let's remove it.

Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 fs/ext4/inode.c | 30 ------------------------------
 1 file changed, 30 deletions(-)

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 34d7e0703cc6..0060d08edd92 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -6089,36 +6089,6 @@ void ext4_dirty_inode(struct inode *inode, int flags)
 	return;
 }
 
-#if 0
-/*
- * Bind an inode's backing buffer_head into this transaction, to prevent
- * it from being flushed to disk early.  Unlike
- * ext4_reserve_inode_write, this leaves behind no bh reference and
- * returns no iloc structure, so the caller needs to repeat the iloc
- * lookup to mark the inode dirty later.
- */
-static int ext4_pin_inode(handle_t *handle, struct inode *inode)
-{
-	struct ext4_iloc iloc;
-
-	int err = 0;
-	if (handle) {
-		err = ext4_get_inode_loc(inode, &iloc);
-		if (!err) {
-			BUFFER_TRACE(iloc.bh, "get_write_access");
-			err = jbd2_journal_get_write_access(handle, iloc.bh);
-			if (!err)
-				err = ext4_handle_dirty_metadata(handle,
-								 NULL,
-								 iloc.bh);
-			brelse(iloc.bh);
-		}
-	}
-	ext4_std_error(inode->i_sb, err);
-	return err;
-}
-#endif
-
 int ext4_change_inode_journal_flag(struct inode *inode, int val)
 {
 	journal_t *journal;
-- 
2.14.5


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

* Re: [PATCH] ext4: remove useless ext4_pin_inode()
  2019-02-27  2:20 [PATCH] ext4: remove useless ext4_pin_inode() Jason Yan
@ 2019-03-04  1:31 ` Jason Yan
  2019-03-04 22:34   ` Theodore Y. Ts'o
  2019-03-05  0:41   ` Andreas Dilger
  0 siblings, 2 replies; 5+ messages in thread
From: Jason Yan @ 2019-03-04  1:31 UTC (permalink / raw)
  To: tytso, adilger.kernel, linux-ext4

Friendly ping...

Anyone can help to review this patch?

On 2019/2/27 10:20, Jason Yan wrote:
> This function is never used from the beginning. Let's remove it.
> 
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---
>   fs/ext4/inode.c | 30 ------------------------------
>   1 file changed, 30 deletions(-)
> 
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 34d7e0703cc6..0060d08edd92 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -6089,36 +6089,6 @@ void ext4_dirty_inode(struct inode *inode, int flags)
>   	return;
>   }
>   
> -#if 0
> -/*
> - * Bind an inode's backing buffer_head into this transaction, to prevent
> - * it from being flushed to disk early.  Unlike
> - * ext4_reserve_inode_write, this leaves behind no bh reference and
> - * returns no iloc structure, so the caller needs to repeat the iloc
> - * lookup to mark the inode dirty later.
> - */
> -static int ext4_pin_inode(handle_t *handle, struct inode *inode)
> -{
> -	struct ext4_iloc iloc;
> -
> -	int err = 0;
> -	if (handle) {
> -		err = ext4_get_inode_loc(inode, &iloc);
> -		if (!err) {
> -			BUFFER_TRACE(iloc.bh, "get_write_access");
> -			err = jbd2_journal_get_write_access(handle, iloc.bh);
> -			if (!err)
> -				err = ext4_handle_dirty_metadata(handle,
> -								 NULL,
> -								 iloc.bh);
> -			brelse(iloc.bh);
> -		}
> -	}
> -	ext4_std_error(inode->i_sb, err);
> -	return err;
> -}
> -#endif
> -
>   int ext4_change_inode_journal_flag(struct inode *inode, int val)
>   {
>   	journal_t *journal;
> 


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

* Re: [PATCH] ext4: remove useless ext4_pin_inode()
  2019-03-04  1:31 ` Jason Yan
@ 2019-03-04 22:34   ` Theodore Y. Ts'o
  2019-03-05  0:41   ` Andreas Dilger
  1 sibling, 0 replies; 5+ messages in thread
From: Theodore Y. Ts'o @ 2019-03-04 22:34 UTC (permalink / raw)
  To: Jason Yan; +Cc: adilger.kernel, linux-ext4

On Mon, Mar 04, 2019 at 09:31:06AM +0800, Jason Yan wrote:
> Friendly ping...
> 
> Anyone can help to review this patch?

It's just removing a function which is commented out.  So it wasn't
high priority for me to try to get it in this close to the merge
window, sorry.

It is being tracked in the ext4 patchwork site and I haven't forgotten
about it.

Cheers,

					- Ted

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

* Re: [PATCH] ext4: remove useless ext4_pin_inode()
  2019-03-04  1:31 ` Jason Yan
  2019-03-04 22:34   ` Theodore Y. Ts'o
@ 2019-03-05  0:41   ` Andreas Dilger
  2019-03-15  3:52     ` Theodore Ts'o
  1 sibling, 1 reply; 5+ messages in thread
From: Andreas Dilger @ 2019-03-05  0:41 UTC (permalink / raw)
  To: Jason Yan; +Cc: tytso, adilger.kernel, linux-ext4

This was originally added during early ext4 development to pin open directories, but it was never really used. I don't mind to remove it. 

Cheers, Andreas

> On Mar 3, 2019, at 18:31, Jason Yan <yanaijie@huawei.com> wrote:
> 
> Friendly ping...
> 
> Anyone can help to review this patch?
> 
>> On 2019/2/27 10:20, Jason Yan wrote:
>> This function is never used from the beginning. Let's remove it.
>> Signed-off-by: Jason Yan <yanaijie@huawei.com>
>> ---
>>  fs/ext4/inode.c | 30 ------------------------------
>>  1 file changed, 30 deletions(-)
>> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
>> index 34d7e0703cc6..0060d08edd92 100644
>> --- a/fs/ext4/inode.c
>> +++ b/fs/ext4/inode.c
>> @@ -6089,36 +6089,6 @@ void ext4_dirty_inode(struct inode *inode, int flags)
>>      return;
>>  }
>>  -#if 0
>> -/*
>> - * Bind an inode's backing buffer_head into this transaction, to prevent
>> - * it from being flushed to disk early.  Unlike
>> - * ext4_reserve_inode_write, this leaves behind no bh reference and
>> - * returns no iloc structure, so the caller needs to repeat the iloc
>> - * lookup to mark the inode dirty later.
>> - */
>> -static int ext4_pin_inode(handle_t *handle, struct inode *inode)
>> -{
>> -    struct ext4_iloc iloc;
>> -
>> -    int err = 0;
>> -    if (handle) {
>> -        err = ext4_get_inode_loc(inode, &iloc);
>> -        if (!err) {
>> -            BUFFER_TRACE(iloc.bh, "get_write_access");
>> -            err = jbd2_journal_get_write_access(handle, iloc.bh);
>> -            if (!err)
>> -                err = ext4_handle_dirty_metadata(handle,
>> -                                 NULL,
>> -                                 iloc.bh);
>> -            brelse(iloc.bh);
>> -        }
>> -    }
>> -    ext4_std_error(inode->i_sb, err);
>> -    return err;
>> -}
>> -#endif
>> -
>>  int ext4_change_inode_journal_flag(struct inode *inode, int val)
>>  {
>>      journal_t *journal;
> 

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

* Re: [PATCH] ext4: remove useless ext4_pin_inode()
  2019-03-05  0:41   ` Andreas Dilger
@ 2019-03-15  3:52     ` Theodore Ts'o
  0 siblings, 0 replies; 5+ messages in thread
From: Theodore Ts'o @ 2019-03-15  3:52 UTC (permalink / raw)
  To: Andreas Dilger; +Cc: Jason Yan, adilger.kernel, linux-ext4

Thanks, applied.

					- Ted

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

end of thread, other threads:[~2019-03-15  3:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-27  2:20 [PATCH] ext4: remove useless ext4_pin_inode() Jason Yan
2019-03-04  1:31 ` Jason Yan
2019-03-04 22:34   ` Theodore Y. Ts'o
2019-03-05  0:41   ` Andreas Dilger
2019-03-15  3:52     ` 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).