ocfs2: dlmfs: remove set but not used variable 'status'
diff mbox series

Message ID 1540300179-26697-1-git-send-email-zhongjiang@huawei.com
State In Next
Commit cb6a8fd7a6bfa0999f726a9cdb506b3345d937b6
Headers show
Series
  • ocfs2: dlmfs: remove set but not used variable 'status'
Related show

Commit Message

zhong jiang Oct. 23, 2018, 1:09 p.m. UTC
status is not used after setting its value. It is safe to remove
the unused variable.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 fs/ocfs2/dlmfs/dlmfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

piaojun Oct. 24, 2018, 12:57 a.m. UTC | #1
LGTM

On 2018/10/23 21:09, zhong jiang wrote:
> status is not used after setting its value. It is safe to remove
> the unused variable.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Reviewed-by: Jun Piao <piaojun@huawei.com>
> ---
>  fs/ocfs2/dlmfs/dlmfs.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c
> index 642e471..b03dd46 100644
> --- a/fs/ocfs2/dlmfs/dlmfs.c
> +++ b/fs/ocfs2/dlmfs/dlmfs.c
> @@ -179,7 +179,7 @@ static int dlmfs_file_open(struct inode *inode,
>  static int dlmfs_file_release(struct inode *inode,
>  			      struct file *file)
>  {
> -	int level, status;
> +	int level;
>  	struct dlmfs_inode_private *ip = DLMFS_I(inode);
>  	struct dlmfs_filp_private *fp = file->private_data;
>  
> @@ -188,7 +188,6 @@ static int dlmfs_file_release(struct inode *inode,
>  
>  	mlog(0, "close called on inode %lu\n", inode->i_ino);
>  
> -	status = 0;
>  	if (fp) {
>  		level = fp->fp_lock_level;
>  		if (level != DLM_LOCK_IV)
>
Joseph Qi Oct. 24, 2018, 10:37 a.m. UTC | #2
On 18/10/23 21:09, zhong jiang wrote:
> status is not used after setting its value. It is safe to remove
> the unused variable.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>

Acked-by: Joseph Qi <jiangqi903@gmail.com>

> ---
>  fs/ocfs2/dlmfs/dlmfs.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c
> index 642e471..b03dd46 100644
> --- a/fs/ocfs2/dlmfs/dlmfs.c
> +++ b/fs/ocfs2/dlmfs/dlmfs.c
> @@ -179,7 +179,7 @@ static int dlmfs_file_open(struct inode *inode,
>  static int dlmfs_file_release(struct inode *inode,
>  			      struct file *file)
>  {
> -	int level, status;
> +	int level;
>  	struct dlmfs_inode_private *ip = DLMFS_I(inode);
>  	struct dlmfs_filp_private *fp = file->private_data;
>  
> @@ -188,7 +188,6 @@ static int dlmfs_file_release(struct inode *inode,
>  
>  	mlog(0, "close called on inode %lu\n", inode->i_ino);
>  
> -	status = 0;
>  	if (fp) {
>  		level = fp->fp_lock_level;
>  		if (level != DLM_LOCK_IV)
>

Patch
diff mbox series

diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c
index 642e471..b03dd46 100644
--- a/fs/ocfs2/dlmfs/dlmfs.c
+++ b/fs/ocfs2/dlmfs/dlmfs.c
@@ -179,7 +179,7 @@  static int dlmfs_file_open(struct inode *inode,
 static int dlmfs_file_release(struct inode *inode,
 			      struct file *file)
 {
-	int level, status;
+	int level;
 	struct dlmfs_inode_private *ip = DLMFS_I(inode);
 	struct dlmfs_filp_private *fp = file->private_data;
 
@@ -188,7 +188,6 @@  static int dlmfs_file_release(struct inode *inode,
 
 	mlog(0, "close called on inode %lu\n", inode->i_ino);
 
-	status = 0;
 	if (fp) {
 		level = fp->fp_lock_level;
 		if (level != DLM_LOCK_IV)