public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* fs/ocfs2/super.c:1809 ocfs2_mount_volume() warn: missing error code 'status'
@ 2022-11-05 11:15 Dan Carpenter
  2022-11-06 12:38 ` Joseph Qi
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Carpenter @ 2022-11-05 11:15 UTC (permalink / raw)
  To: oe-kbuild, Heming Zhao via Ocfs2-devel
  Cc: lkp, oe-kbuild-all, linux-kernel, Andrew Morton,
	Linux Memory Management List, Joseph Qi

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   10d916c86ecafeccaed89175ebf9b832dddde380
commit: 0737e01de9c411e4db87dcedf4a9789d41b1c5c1 ocfs2: ocfs2_mount_volume does cleanup job before return error
config: alpha-randconfig-m041-20221030
compiler: alpha-linux-gcc (GCC) 12.1.0

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>

smatch warnings:
fs/ocfs2/super.c:1809 ocfs2_mount_volume() warn: missing error code 'status'

vim +/status +1809 fs/ocfs2/super.c

ccd979bdbce9fba Mark Fasheh                 2005-12-15  1802  
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1803  static int ocfs2_mount_volume(struct super_block *sb)
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1804  {
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1805  	int status = 0;
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1806  	struct ocfs2_super *osb = OCFS2_SB(sb);
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1807  
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1808  	if (ocfs2_is_hard_readonly(osb))
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29 @1809  		goto out;

Unclear if this is an error path or a success path.  Honestly, I would
have thought the checker is correct that it looks like a failure path.

ccd979bdbce9fba Mark Fasheh                 2005-12-15  1810  
5500ab4ed3b8f07 Gang He                     2019-03-05  1811  	mutex_init(&osb->obs_trim_fs_mutex);
5500ab4ed3b8f07 Gang He                     2019-03-05  1812  
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1813  	status = ocfs2_dlm_init(osb);
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1814  	if (status < 0) {
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1815  		mlog_errno(status);
a52370b3b182f79 Gang He                     2018-01-31  1816  		if (status == -EBADR && ocfs2_userspace_stack(osb))
a52370b3b182f79 Gang He                     2018-01-31  1817  			mlog(ML_ERROR, "couldn't mount because cluster name on"
a52370b3b182f79 Gang He                     2018-01-31  1818  			" disk does not match the running cluster name.\n");
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1819  		goto out;
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1820  	}
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1821  
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1822  	status = ocfs2_super_lock(osb, 1);
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1823  	if (status < 0) {
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1824  		mlog_errno(status);
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1825  		goto out_dlm;
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1826  	}
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1827  
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1828  	/* This will load up the node map and add ourselves to it. */
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1829  	status = ocfs2_find_slot(osb);
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1830  	if (status < 0) {
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1831  		mlog_errno(status);
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1832  		goto out_super_lock;
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1833  	}
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1834  
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1835  	/* load all node-local system inodes */
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1836  	status = ocfs2_init_local_system_inodes(osb);
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1837  	if (status < 0) {
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1838  		mlog_errno(status);
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1839  		goto out_super_lock;
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1840  	}
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1841  
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1842  	status = ocfs2_check_volume(osb);
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1843  	if (status < 0) {
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1844  		mlog_errno(status);
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1845  		goto out_system_inodes;
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1846  	}
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1847  
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1848  	status = ocfs2_truncate_log_init(osb);
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1849  	if (status < 0) {
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1850  		mlog_errno(status);
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1851  		goto out_system_inodes;
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1852  	}
c271c5c22b0a7ca Sunil Mushran               2006-12-05  1853  
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1854  	ocfs2_super_unlock(osb, 1);
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1855  	return 0;
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1856  
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1857  out_system_inodes:
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1858  	if (osb->local_alloc_state == OCFS2_LA_ENABLED)
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1859  		ocfs2_shutdown_local_alloc(osb);
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1860  	ocfs2_release_system_inodes(osb);
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1861  	/* before journal shutdown, we should release slot_info */
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1862  	ocfs2_free_slot_info(osb);
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1863  	ocfs2_journal_shutdown(osb);
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1864  out_super_lock:
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1865  	ocfs2_super_unlock(osb, 1);
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1866  out_dlm:
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1867  	ocfs2_dlm_shutdown(osb, 0);
0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29  1868  out:
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1869  	return status;
ccd979bdbce9fba Mark Fasheh                 2005-12-15  1870  }

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp


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

* Re: fs/ocfs2/super.c:1809 ocfs2_mount_volume() warn: missing error code 'status'
  2022-11-05 11:15 fs/ocfs2/super.c:1809 ocfs2_mount_volume() warn: missing error code 'status' Dan Carpenter
@ 2022-11-06 12:38 ` Joseph Qi
  2022-11-07  7:52   ` Dan Carpenter
  0 siblings, 1 reply; 8+ messages in thread
From: Joseph Qi @ 2022-11-06 12:38 UTC (permalink / raw)
  To: Dan Carpenter, oe-kbuild, Heming Zhao via Ocfs2-devel
  Cc: lkp, oe-kbuild-all, linux-kernel, Andrew Morton,
	Linux Memory Management List



On 11/5/22 7:15 PM, Dan Carpenter wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   10d916c86ecafeccaed89175ebf9b832dddde380
> commit: 0737e01de9c411e4db87dcedf4a9789d41b1c5c1 ocfs2: ocfs2_mount_volume does cleanup job before return error
> config: alpha-randconfig-m041-20221030
> compiler: alpha-linux-gcc (GCC) 12.1.0
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> | Reported-by: Dan Carpenter <error27@gmail.com>
> 
> smatch warnings:
> fs/ocfs2/super.c:1809 ocfs2_mount_volume() warn: missing error code 'status'
> 
> vim +/status +1809 fs/ocfs2/super.c
> 
> ccd979bdbce9fba Mark Fasheh                 2005-12-15  1802  
> ccd979bdbce9fba Mark Fasheh                 2005-12-15  1803  static int ocfs2_mount_volume(struct super_block *sb)
> ccd979bdbce9fba Mark Fasheh                 2005-12-15  1804  {
> ccd979bdbce9fba Mark Fasheh                 2005-12-15  1805  	int status = 0;
> ccd979bdbce9fba Mark Fasheh                 2005-12-15  1806  	struct ocfs2_super *osb = OCFS2_SB(sb);
> ccd979bdbce9fba Mark Fasheh                 2005-12-15  1807  
> ccd979bdbce9fba Mark Fasheh                 2005-12-15  1808  	if (ocfs2_is_hard_readonly(osb))
> 0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29 @1809  		goto out;
> 
> Unclear if this is an error path or a success path.  Honestly, I would
> have thought the checker is correct that it looks like a failure path.
> 
This indicates a readonly mount and bypasses dlm related initialization.
So it seems an expected success return.

Thanks,
Joseph

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

* Re: fs/ocfs2/super.c:1809 ocfs2_mount_volume() warn: missing error code 'status'
  2022-11-06 12:38 ` Joseph Qi
@ 2022-11-07  7:52   ` Dan Carpenter
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2022-11-07  7:52 UTC (permalink / raw)
  To: Joseph Qi
  Cc: oe-kbuild, Heming Zhao via Ocfs2-devel, lkp, oe-kbuild-all,
	linux-kernel, Andrew Morton, Linux Memory Management List

On Sun, Nov 06, 2022 at 08:38:07PM +0800, Joseph Qi wrote:
> 
> 
> On 11/5/22 7:15 PM, Dan Carpenter wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   10d916c86ecafeccaed89175ebf9b832dddde380
> > commit: 0737e01de9c411e4db87dcedf4a9789d41b1c5c1 ocfs2: ocfs2_mount_volume does cleanup job before return error
> > config: alpha-randconfig-m041-20221030
> > compiler: alpha-linux-gcc (GCC) 12.1.0
> > 
> > If you fix the issue, kindly add following tag where applicable
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Reported-by: Dan Carpenter <error27@gmail.com>
> > 
> > smatch warnings:
> > fs/ocfs2/super.c:1809 ocfs2_mount_volume() warn: missing error code 'status'
> > 
> > vim +/status +1809 fs/ocfs2/super.c
> > 
> > ccd979bdbce9fba Mark Fasheh                 2005-12-15  1802  
> > ccd979bdbce9fba Mark Fasheh                 2005-12-15  1803  static int ocfs2_mount_volume(struct super_block *sb)
> > ccd979bdbce9fba Mark Fasheh                 2005-12-15  1804  {
> > ccd979bdbce9fba Mark Fasheh                 2005-12-15  1805  	int status = 0;
> > ccd979bdbce9fba Mark Fasheh                 2005-12-15  1806  	struct ocfs2_super *osb = OCFS2_SB(sb);
> > ccd979bdbce9fba Mark Fasheh                 2005-12-15  1807  
> > ccd979bdbce9fba Mark Fasheh                 2005-12-15  1808  	if (ocfs2_is_hard_readonly(osb))
> > 0737e01de9c411e Heming Zhao via Ocfs2-devel 2022-04-29 @1809  		goto out;
> > 
> > Unclear if this is an error path or a success path.  Honestly, I would
> > have thought the checker is correct that it looks like a failure path.
> > 
> This indicates a readonly mount and bypasses dlm related initialization.
> So it seems an expected success return.
> 

A comment would help.  Another way to silence this static checker warning
and answer any reviewer questions would be to set the "ret = 0;" within
4 lines of the goto.

	if (ocfs2_is_hard_readonly(osb)) {
		status = 0;
		goto out;
	}

regards,
dan carpenter


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

* fs/ocfs2/super.c:1809 ocfs2_mount_volume() warn: missing error code 'status'
@ 2023-04-03  6:14 Dan Carpenter
  2023-04-03 11:07 ` Joseph Qi
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Carpenter @ 2023-04-03  6:14 UTC (permalink / raw)
  To: oe-kbuild, Heming Zhao via Ocfs2-devel
  Cc: lkp, oe-kbuild-all, linux-kernel, Andrew Morton, Joseph Qi

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   7b50567bdcad8925ca1e075feb7171c12015afd1
commit: 0737e01de9c411e4db87dcedf4a9789d41b1c5c1 ocfs2: ocfs2_mount_volume does cleanup job before return error
config: arm64-randconfig-m041-20230329 (https://download.01.org/0day-ci/archive/20230401/202304012244.gX4H4rBO-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.1.0

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Link: https://lore.kernel.org/r/202304012244.gX4H4rBO-lkp@intel.com/

smatch warnings:
fs/ocfs2/super.c:1809 ocfs2_mount_volume() warn: missing error code 'status'

vim +/status +1809 fs/ocfs2/super.c

ccd979bdbce9fb Mark Fasheh                 2005-12-15  1803  static int ocfs2_mount_volume(struct super_block *sb)
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1804  {
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1805  	int status = 0;
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1806  	struct ocfs2_super *osb = OCFS2_SB(sb);
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1807  
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1808  	if (ocfs2_is_hard_readonly(osb))
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29 @1809  		goto out;

Hard to tell if this should be an error path or not...  Canonical
problem with do nothing gotos.

ccd979bdbce9fb Mark Fasheh                 2005-12-15  1810  
5500ab4ed3b8f0 Gang He                     2019-03-05  1811  	mutex_init(&osb->obs_trim_fs_mutex);
5500ab4ed3b8f0 Gang He                     2019-03-05  1812  
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1813  	status = ocfs2_dlm_init(osb);
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1814  	if (status < 0) {
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1815  		mlog_errno(status);
a52370b3b182f7 Gang He                     2018-01-31  1816  		if (status == -EBADR && ocfs2_userspace_stack(osb))
a52370b3b182f7 Gang He                     2018-01-31  1817  			mlog(ML_ERROR, "couldn't mount because cluster name on"
a52370b3b182f7 Gang He                     2018-01-31  1818  			" disk does not match the running cluster name.\n");
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1819  		goto out;
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1820  	}
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1821  
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1822  	status = ocfs2_super_lock(osb, 1);
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1823  	if (status < 0) {
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1824  		mlog_errno(status);
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1825  		goto out_dlm;
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1826  	}
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1827  
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1828  	/* This will load up the node map and add ourselves to it. */
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1829  	status = ocfs2_find_slot(osb);
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1830  	if (status < 0) {
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1831  		mlog_errno(status);
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1832  		goto out_super_lock;
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1833  	}
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1834  
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1835  	/* load all node-local system inodes */
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1836  	status = ocfs2_init_local_system_inodes(osb);
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1837  	if (status < 0) {
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1838  		mlog_errno(status);
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1839  		goto out_super_lock;
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1840  	}
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1841  
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1842  	status = ocfs2_check_volume(osb);
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1843  	if (status < 0) {
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1844  		mlog_errno(status);
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1845  		goto out_system_inodes;
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1846  	}
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1847  
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1848  	status = ocfs2_truncate_log_init(osb);
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1849  	if (status < 0) {
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1850  		mlog_errno(status);
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1851  		goto out_system_inodes;
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1852  	}
c271c5c22b0a7c Sunil Mushran               2006-12-05  1853  
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1854  	ocfs2_super_unlock(osb, 1);
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1855  	return 0;
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1856  
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1857  out_system_inodes:
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1858  	if (osb->local_alloc_state == OCFS2_LA_ENABLED)
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1859  		ocfs2_shutdown_local_alloc(osb);
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1860  	ocfs2_release_system_inodes(osb);
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1861  	/* before journal shutdown, we should release slot_info */
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1862  	ocfs2_free_slot_info(osb);
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1863  	ocfs2_journal_shutdown(osb);
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1864  out_super_lock:
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1865  	ocfs2_super_unlock(osb, 1);
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1866  out_dlm:
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1867  	ocfs2_dlm_shutdown(osb, 0);
0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1868  out:
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1869  	return status;
ccd979bdbce9fb Mark Fasheh                 2005-12-15  1870  }

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests


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

* Re: fs/ocfs2/super.c:1809 ocfs2_mount_volume() warn: missing error code 'status'
  2023-04-03  6:14 Dan Carpenter
@ 2023-04-03 11:07 ` Joseph Qi
  2023-04-03 11:20   ` Dan Carpenter
  0 siblings, 1 reply; 8+ messages in thread
From: Joseph Qi @ 2023-04-03 11:07 UTC (permalink / raw)
  To: Dan Carpenter, oe-kbuild, Heming Zhao via Ocfs2-devel
  Cc: lkp, oe-kbuild-all, linux-kernel, Andrew Morton

Hi,
IIRC, we've discussed this before.
Success return is expected in case of 'hard readonly'.
So this a false positive report.

Thanks,
Joseph

On 4/3/23 2:14 PM, Dan Carpenter wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   7b50567bdcad8925ca1e075feb7171c12015afd1
> commit: 0737e01de9c411e4db87dcedf4a9789d41b1c5c1 ocfs2: ocfs2_mount_volume does cleanup job before return error
> config: arm64-randconfig-m041-20230329 (https://download.01.org/0day-ci/archive/20230401/202304012244.gX4H4rBO-lkp@intel.com/config)
> compiler: aarch64-linux-gcc (GCC) 12.1.0
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> | Reported-by: Dan Carpenter <error27@gmail.com>
> | Link: https://lore.kernel.org/r/202304012244.gX4H4rBO-lkp@intel.com/
> 
> smatch warnings:
> fs/ocfs2/super.c:1809 ocfs2_mount_volume() warn: missing error code 'status'
> 
> vim +/status +1809 fs/ocfs2/super.c
> 
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1803  static int ocfs2_mount_volume(struct super_block *sb)
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1804  {
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1805  	int status = 0;
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1806  	struct ocfs2_super *osb = OCFS2_SB(sb);
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1807  
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1808  	if (ocfs2_is_hard_readonly(osb))
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29 @1809  		goto out;
> 
> Hard to tell if this should be an error path or not...  Canonical
> problem with do nothing gotos.
> 
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1810  
> 5500ab4ed3b8f0 Gang He                     2019-03-05  1811  	mutex_init(&osb->obs_trim_fs_mutex);
> 5500ab4ed3b8f0 Gang He                     2019-03-05  1812  
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1813  	status = ocfs2_dlm_init(osb);
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1814  	if (status < 0) {
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1815  		mlog_errno(status);
> a52370b3b182f7 Gang He                     2018-01-31  1816  		if (status == -EBADR && ocfs2_userspace_stack(osb))
> a52370b3b182f7 Gang He                     2018-01-31  1817  			mlog(ML_ERROR, "couldn't mount because cluster name on"
> a52370b3b182f7 Gang He                     2018-01-31  1818  			" disk does not match the running cluster name.\n");
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1819  		goto out;
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1820  	}
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1821  
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1822  	status = ocfs2_super_lock(osb, 1);
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1823  	if (status < 0) {
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1824  		mlog_errno(status);
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1825  		goto out_dlm;
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1826  	}
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1827  
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1828  	/* This will load up the node map and add ourselves to it. */
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1829  	status = ocfs2_find_slot(osb);
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1830  	if (status < 0) {
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1831  		mlog_errno(status);
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1832  		goto out_super_lock;
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1833  	}
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1834  
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1835  	/* load all node-local system inodes */
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1836  	status = ocfs2_init_local_system_inodes(osb);
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1837  	if (status < 0) {
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1838  		mlog_errno(status);
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1839  		goto out_super_lock;
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1840  	}
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1841  
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1842  	status = ocfs2_check_volume(osb);
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1843  	if (status < 0) {
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1844  		mlog_errno(status);
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1845  		goto out_system_inodes;
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1846  	}
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1847  
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1848  	status = ocfs2_truncate_log_init(osb);
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1849  	if (status < 0) {
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1850  		mlog_errno(status);
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1851  		goto out_system_inodes;
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1852  	}
> c271c5c22b0a7c Sunil Mushran               2006-12-05  1853  
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1854  	ocfs2_super_unlock(osb, 1);
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1855  	return 0;
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1856  
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1857  out_system_inodes:
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1858  	if (osb->local_alloc_state == OCFS2_LA_ENABLED)
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1859  		ocfs2_shutdown_local_alloc(osb);
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1860  	ocfs2_release_system_inodes(osb);
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1861  	/* before journal shutdown, we should release slot_info */
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1862  	ocfs2_free_slot_info(osb);
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1863  	ocfs2_journal_shutdown(osb);
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1864  out_super_lock:
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1865  	ocfs2_super_unlock(osb, 1);
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1866  out_dlm:
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1867  	ocfs2_dlm_shutdown(osb, 0);
> 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1868  out:
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1869  	return status;
> ccd979bdbce9fb Mark Fasheh                 2005-12-15  1870  }
> 

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

* Re: fs/ocfs2/super.c:1809 ocfs2_mount_volume() warn: missing error code 'status'
  2023-04-03 11:07 ` Joseph Qi
@ 2023-04-03 11:20   ` Dan Carpenter
  2023-04-04 14:50     ` Philip Li
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Carpenter @ 2023-04-03 11:20 UTC (permalink / raw)
  To: Joseph Qi, lkp, oe-kbuild-all
  Cc: oe-kbuild, Heming Zhao via Ocfs2-devel, linux-kernel,
	Andrew Morton

Sorry, the kbuild bot is not supposed to send duplicate warnings.  I
don't know why it was sent again...

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   7b50567bdcad8925ca1e075feb7171c12015afd1
commit: 0737e01de9c411e4db87dcedf4a9789d41b1c5c1 ocfs2: ocfs2_mount_volume does cleanup job before return error
date:   11 months ago
:::::: branch date: 15 hours ago
       ^^^^^^^^^^^^^^^^^^^^^^^^^
Something happened on Apr 1.

:::::: commit date: 11 months ago
config: arm64-randconfig-m041-20230329 (https://download.01.org/0day-ci/archive/20230401/202304012244.gX4H4rBO-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.1.0

regards,
dan carpenter

On Mon, Apr 03, 2023 at 07:07:37PM +0800, Joseph Qi wrote:
> Hi,
> IIRC, we've discussed this before.
> Success return is expected in case of 'hard readonly'.
> So this a false positive report.
> 
> Thanks,
> Joseph
> 
> On 4/3/23 2:14 PM, Dan Carpenter wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   7b50567bdcad8925ca1e075feb7171c12015afd1
> > commit: 0737e01de9c411e4db87dcedf4a9789d41b1c5c1 ocfs2: ocfs2_mount_volume does cleanup job before return error
> > config: arm64-randconfig-m041-20230329 (https://download.01.org/0day-ci/archive/20230401/202304012244.gX4H4rBO-lkp@intel.com/config)
> > compiler: aarch64-linux-gcc (GCC) 12.1.0
> > 
> > If you fix the issue, kindly add following tag where applicable
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Reported-by: Dan Carpenter <error27@gmail.com>
> > | Link: https://lore.kernel.org/r/202304012244.gX4H4rBO-lkp@intel.com/
> > 
> > smatch warnings:
> > fs/ocfs2/super.c:1809 ocfs2_mount_volume() warn: missing error code 'status'
> > 
> > vim +/status +1809 fs/ocfs2/super.c
> > 
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1803  static int ocfs2_mount_volume(struct super_block *sb)
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1804  {
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1805  	int status = 0;
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1806  	struct ocfs2_super *osb = OCFS2_SB(sb);
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1807  
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1808  	if (ocfs2_is_hard_readonly(osb))
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29 @1809  		goto out;
> > 
> > Hard to tell if this should be an error path or not...  Canonical
> > problem with do nothing gotos.
> > 
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1810  
> > 5500ab4ed3b8f0 Gang He                     2019-03-05  1811  	mutex_init(&osb->obs_trim_fs_mutex);
> > 5500ab4ed3b8f0 Gang He                     2019-03-05  1812  
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1813  	status = ocfs2_dlm_init(osb);
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1814  	if (status < 0) {
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1815  		mlog_errno(status);
> > a52370b3b182f7 Gang He                     2018-01-31  1816  		if (status == -EBADR && ocfs2_userspace_stack(osb))
> > a52370b3b182f7 Gang He                     2018-01-31  1817  			mlog(ML_ERROR, "couldn't mount because cluster name on"
> > a52370b3b182f7 Gang He                     2018-01-31  1818  			" disk does not match the running cluster name.\n");
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1819  		goto out;
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1820  	}
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1821  
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1822  	status = ocfs2_super_lock(osb, 1);
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1823  	if (status < 0) {
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1824  		mlog_errno(status);
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1825  		goto out_dlm;
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1826  	}
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1827  
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1828  	/* This will load up the node map and add ourselves to it. */
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1829  	status = ocfs2_find_slot(osb);
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1830  	if (status < 0) {
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1831  		mlog_errno(status);
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1832  		goto out_super_lock;
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1833  	}
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1834  
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1835  	/* load all node-local system inodes */
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1836  	status = ocfs2_init_local_system_inodes(osb);
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1837  	if (status < 0) {
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1838  		mlog_errno(status);
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1839  		goto out_super_lock;
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1840  	}
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1841  
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1842  	status = ocfs2_check_volume(osb);
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1843  	if (status < 0) {
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1844  		mlog_errno(status);
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1845  		goto out_system_inodes;
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1846  	}
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1847  
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1848  	status = ocfs2_truncate_log_init(osb);
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1849  	if (status < 0) {
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1850  		mlog_errno(status);
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1851  		goto out_system_inodes;
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1852  	}
> > c271c5c22b0a7c Sunil Mushran               2006-12-05  1853  
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1854  	ocfs2_super_unlock(osb, 1);
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1855  	return 0;
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1856  
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1857  out_system_inodes:
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1858  	if (osb->local_alloc_state == OCFS2_LA_ENABLED)
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1859  		ocfs2_shutdown_local_alloc(osb);
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1860  	ocfs2_release_system_inodes(osb);
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1861  	/* before journal shutdown, we should release slot_info */
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1862  	ocfs2_free_slot_info(osb);
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1863  	ocfs2_journal_shutdown(osb);
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1864  out_super_lock:
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1865  	ocfs2_super_unlock(osb, 1);
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1866  out_dlm:
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1867  	ocfs2_dlm_shutdown(osb, 0);
> > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1868  out:
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1869  	return status;
> > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1870  }
> > 

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

* Re: fs/ocfs2/super.c:1809 ocfs2_mount_volume() warn: missing error code 'status'
  2023-04-03 11:20   ` Dan Carpenter
@ 2023-04-04 14:50     ` Philip Li
  2023-04-04 15:03       ` Dan Carpenter
  0 siblings, 1 reply; 8+ messages in thread
From: Philip Li @ 2023-04-04 14:50 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Joseph Qi, lkp, oe-kbuild-all, oe-kbuild,
	Heming Zhao via Ocfs2-devel, linux-kernel, Andrew Morton

On Mon, Apr 03, 2023 at 02:20:55PM +0300, Dan Carpenter wrote:
> Sorry, the kbuild bot is not supposed to send duplicate warnings.  I
> don't know why it was sent again...

Sorry about this, we should ignore this commit in the bot. Now it is configured
to avoid the false positive report.

> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   7b50567bdcad8925ca1e075feb7171c12015afd1
> commit: 0737e01de9c411e4db87dcedf4a9789d41b1c5c1 ocfs2: ocfs2_mount_volume does cleanup job before return error
> date:   11 months ago
> :::::: branch date: 15 hours ago
>        ^^^^^^^^^^^^^^^^^^^^^^^^^
> Something happened on Apr 1.
> 
> :::::: commit date: 11 months ago
> config: arm64-randconfig-m041-20230329 (https://download.01.org/0day-ci/archive/20230401/202304012244.gX4H4rBO-lkp@intel.com/config)
> compiler: aarch64-linux-gcc (GCC) 12.1.0
> 
> regards,
> dan carpenter
> 
> On Mon, Apr 03, 2023 at 07:07:37PM +0800, Joseph Qi wrote:
> > Hi,
> > IIRC, we've discussed this before.
> > Success return is expected in case of 'hard readonly'.
> > So this a false positive report.
> > 
> > Thanks,
> > Joseph
> > 
> > On 4/3/23 2:14 PM, Dan Carpenter wrote:
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > > head:   7b50567bdcad8925ca1e075feb7171c12015afd1
> > > commit: 0737e01de9c411e4db87dcedf4a9789d41b1c5c1 ocfs2: ocfs2_mount_volume does cleanup job before return error
> > > config: arm64-randconfig-m041-20230329 (https://download.01.org/0day-ci/archive/20230401/202304012244.gX4H4rBO-lkp@intel.com/config)
> > > compiler: aarch64-linux-gcc (GCC) 12.1.0
> > > 
> > > If you fix the issue, kindly add following tag where applicable
> > > | Reported-by: kernel test robot <lkp@intel.com>
> > > | Reported-by: Dan Carpenter <error27@gmail.com>
> > > | Link: https://lore.kernel.org/r/202304012244.gX4H4rBO-lkp@intel.com/
> > > 
> > > smatch warnings:
> > > fs/ocfs2/super.c:1809 ocfs2_mount_volume() warn: missing error code 'status'
> > > 
> > > vim +/status +1809 fs/ocfs2/super.c
> > > 
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1803  static int ocfs2_mount_volume(struct super_block *sb)
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1804  {
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1805  	int status = 0;
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1806  	struct ocfs2_super *osb = OCFS2_SB(sb);
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1807  
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1808  	if (ocfs2_is_hard_readonly(osb))
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29 @1809  		goto out;
> > > 
> > > Hard to tell if this should be an error path or not...  Canonical
> > > problem with do nothing gotos.
> > > 
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1810  
> > > 5500ab4ed3b8f0 Gang He                     2019-03-05  1811  	mutex_init(&osb->obs_trim_fs_mutex);
> > > 5500ab4ed3b8f0 Gang He                     2019-03-05  1812  
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1813  	status = ocfs2_dlm_init(osb);
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1814  	if (status < 0) {
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1815  		mlog_errno(status);
> > > a52370b3b182f7 Gang He                     2018-01-31  1816  		if (status == -EBADR && ocfs2_userspace_stack(osb))
> > > a52370b3b182f7 Gang He                     2018-01-31  1817  			mlog(ML_ERROR, "couldn't mount because cluster name on"
> > > a52370b3b182f7 Gang He                     2018-01-31  1818  			" disk does not match the running cluster name.\n");
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1819  		goto out;
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1820  	}
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1821  
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1822  	status = ocfs2_super_lock(osb, 1);
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1823  	if (status < 0) {
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1824  		mlog_errno(status);
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1825  		goto out_dlm;
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1826  	}
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1827  
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1828  	/* This will load up the node map and add ourselves to it. */
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1829  	status = ocfs2_find_slot(osb);
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1830  	if (status < 0) {
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1831  		mlog_errno(status);
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1832  		goto out_super_lock;
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1833  	}
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1834  
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1835  	/* load all node-local system inodes */
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1836  	status = ocfs2_init_local_system_inodes(osb);
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1837  	if (status < 0) {
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1838  		mlog_errno(status);
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1839  		goto out_super_lock;
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1840  	}
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1841  
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1842  	status = ocfs2_check_volume(osb);
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1843  	if (status < 0) {
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1844  		mlog_errno(status);
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1845  		goto out_system_inodes;
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1846  	}
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1847  
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1848  	status = ocfs2_truncate_log_init(osb);
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1849  	if (status < 0) {
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1850  		mlog_errno(status);
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1851  		goto out_system_inodes;
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1852  	}
> > > c271c5c22b0a7c Sunil Mushran               2006-12-05  1853  
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1854  	ocfs2_super_unlock(osb, 1);
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1855  	return 0;
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1856  
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1857  out_system_inodes:
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1858  	if (osb->local_alloc_state == OCFS2_LA_ENABLED)
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1859  		ocfs2_shutdown_local_alloc(osb);
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1860  	ocfs2_release_system_inodes(osb);
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1861  	/* before journal shutdown, we should release slot_info */
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1862  	ocfs2_free_slot_info(osb);
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1863  	ocfs2_journal_shutdown(osb);
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1864  out_super_lock:
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1865  	ocfs2_super_unlock(osb, 1);
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1866  out_dlm:
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1867  	ocfs2_dlm_shutdown(osb, 0);
> > > 0737e01de9c411 Heming Zhao via Ocfs2-devel 2022-04-29  1868  out:
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1869  	return status;
> > > ccd979bdbce9fb Mark Fasheh                 2005-12-15  1870  }
> > > 
> 

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

* Re: fs/ocfs2/super.c:1809 ocfs2_mount_volume() warn: missing error code 'status'
  2023-04-04 14:50     ` Philip Li
@ 2023-04-04 15:03       ` Dan Carpenter
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2023-04-04 15:03 UTC (permalink / raw)
  To: Philip Li
  Cc: Joseph Qi, lkp, oe-kbuild-all, oe-kbuild,
	Heming Zhao via Ocfs2-devel, linux-kernel, Andrew Morton

On Tue, Apr 04, 2023 at 10:50:57PM +0800, Philip Li wrote:
> On Mon, Apr 03, 2023 at 02:20:55PM +0300, Dan Carpenter wrote:
> > Sorry, the kbuild bot is not supposed to send duplicate warnings.  I
> > don't know why it was sent again...
> 
> Sorry about this, we should ignore this commit in the bot. Now it is configured
> to avoid the false positive report.
> 

Fantastic.  Thanks, Philip!

regards,
dan carpenter


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

end of thread, other threads:[~2023-04-04 15:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-05 11:15 fs/ocfs2/super.c:1809 ocfs2_mount_volume() warn: missing error code 'status' Dan Carpenter
2022-11-06 12:38 ` Joseph Qi
2022-11-07  7:52   ` Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2023-04-03  6:14 Dan Carpenter
2023-04-03 11:07 ` Joseph Qi
2023-04-03 11:20   ` Dan Carpenter
2023-04-04 14:50     ` Philip Li
2023-04-04 15:03       ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox