[Ocfs2-devel] fs/ocfs2/super.c:1809 ocfs2_mount_volume() warn: missing error code 'status'

Joseph Qi joseph.qi at linux.alibaba.com
Sun Nov 6 12:38:07 UTC 2022



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 at intel.com>
> | Reported-by: Dan Carpenter <error27 at 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



More information about the Ocfs2-devel mailing list