Skip to contentSkip to conversation

ocfs2: fix build warning

PATCH In review Sudip Mukherjee 3 participants 3 messages Feb 2, 2016 – Feb 13, 2016 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ocfs2: fix build warning

We were getting build warning about:
/fs/ocfs2/file.c: In function ?ocfs2_file_write_iter?:
fs/ocfs2/file.c:2198:1: warning: label ?relock? defined but not used

The previous commit has cleaned up the code for direct io and removed the jump instruction to relock, but missed removing the label which is unused now.

Fixes 1a46f12e5071 ("ocfs2: code clean up for direct io")
Cc Ryan Ding <[email protected]>
---
 fs/ocfs2/file.c | 1 -
 1 file changed, 1 deletion(-)
fs/ocfs2/file.c +0 -1
index 41c506e..c18ab45 100644
@@ -2195,7 +2195,6 @@ static ssize_t ocfs2_file_write_iter(struct kiocb *iocb,
 
 	inode_lock(inode);
 
-relock:
 	/*
 	 * Concurrent O_DIRECT writes are allowed with
 	 * mount_option "coherency=buffered".
Signature · 1 line
1.9.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Sudip Mukherjee

We were getting build warning about:
/fs/ocfs2/file.c: In function ?ocfs2_file_write_iter?:
fs/ocfs2/file.c:2198:1: warning: label ?relock? defined but not used

The previous commit has cleaned up the code for direct io and removed the jump instruction to relock, but missed removing the label which is unused now.

Fixes 1a46f12e5071 ("ocfs2: code clean up for direct io")
Cc Ryan Ding <[email protected]>
Quoted 16 lines
---
  fs/ocfs2/file.c | 1 -
  1 file changed, 1 deletion(-)
fs/ocfs2/file.c +0 -1
index 41c506e..c18ab45 100644
@@ -2195,7 +2195,6 @@ static ssize_t ocfs2_file_write_iter(struct kiocb *iocb,
 
  	inode_lock(inode);
 
-relock:
  	/*
  	 * Concurrent O_DIRECT writes are allowed with
  	 * mount_option "coherency=buffered".
#2 lore raw
In reply to Sudip Mukherjee
reproduce:

Hi Sudip,

[auto build test ERROR on v4.5-rc2]
[cannot apply to next-20160212]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Sudip-Mukherjee/ocfs2-fix-build-warning/20160202-144936
config: i386-randconfig-x0-02140608 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

fs/ocfs2/file.c: In function 'ocfs2_file_write_iter':

>> fs/ocfs2/file.c:2369:3: error: label 'relock' used but not defined
      goto relock;
      ^

vim +/relock +2369 fs/ocfs2/file.c

9517bac6 Mark Fasheh 2007-02-09  2363  		rw_level = -1;
9517bac6 Mark Fasheh 2007-02-09  2364  
9517bac6 Mark Fasheh 2007-02-09  2365  		direct_io = 0;
7da839c4 Al Viro     2015-04-09  2366  		iocb->ki_flags &= ~IOCB_DIRECT;
3309dd04 Al Viro     2015-04-09  2367  		iov_iter_reexpand(from, orig_count);
7da839c4 Al Viro     2015-04-09  2368  		dropped_dio = 1;
9517bac6 Mark Fasheh 2007-02-09 @2369  		goto relock;
9517bac6 Mark Fasheh 2007-02-09  2370  	}
9517bac6 Mark Fasheh 2007-02-09  2371  
a11f7e63 Mark Fasheh 2011-06-22  2372  	if (unaligned_dio) {

:::::: The code at line 2369 was first introduced by commit
:::::: 9517bac6cc7a7aa4fee63cb38a32cb6014e264c7 ocfs2: teach ocfs2_file_aio_write() about sparse files

:::::: TO: Mark Fasheh <[email protected]>
:::::: CC: Mark Fasheh <[email protected]>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/octet-stream
Size: 19962 bytes
Desc: not available
Url : http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20160214/f102b040/attachment-0001.obj