[PATCH] fs: gfs: Delete duplicate function generic_update_time calls

Chaohai Chen posted 1 patch 8 months, 1 week ago
fs/gfs2/inode.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] fs: gfs: Delete duplicate function generic_update_time calls
Posted by Chaohai Chen 8 months, 1 week ago
generic_update_time is called by inode_update_time after
processing gfs2_update_time function, gfs2_update_time do not
need call the generic_update_time again.

Signed-off-by: Chaohai Chen <wdhh6@aliyun.com>
---
 fs/gfs2/inode.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 6fbbaaad1cd0..05fc363bd6e7 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -2171,7 +2171,6 @@ static int gfs2_update_time(struct inode *inode, int flags)
 		if (error)
 			return error;
 	}
-	generic_update_time(inode, flags);
 	return 0;
 }
 
-- 
2.34.1
Re: [PATCH] fs: gfs: Delete duplicate function generic_update_time calls
Posted by Andrew Price 8 months, 1 week ago
On 16/04/2025 10:42, Chaohai Chen wrote:
> generic_update_time is called by inode_update_time after
> processing gfs2_update_time function,

This is incorrect. inode_update_time() returns after calling 
gfs2_update_time():

          if (inode->i_op->update_time)
                  return inode->i_op->update_time(inode, flags);
          generic_update_time(inode, flags);

Andy

> gfs2_update_time do not
> need call the generic_update_time again.
> 
> Signed-off-by: Chaohai Chen <wdhh6@aliyun.com>
> ---
>   fs/gfs2/inode.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
> index 6fbbaaad1cd0..05fc363bd6e7 100644
> --- a/fs/gfs2/inode.c
> +++ b/fs/gfs2/inode.c
> @@ -2171,7 +2171,6 @@ static int gfs2_update_time(struct inode *inode, int flags)
>   		if (error)
>   			return error;
>   	}
> -	generic_update_time(inode, flags);
>   	return 0;
>   }
>