[openeuler:openEuler-1.0-LTS 1941/1941] fs/nfs/nfs4state.c:1959:20: warning: this statement may fall through
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: df8d11fbcbb07177c2500e63d7f5a36063977596 commit: e0266694b581d23df8040ccfa9b7b25e4545e25e [1941/1941] NFSv4: Fail mounts if the lease setup times out config: arm64-defconfig (https://download.01.org/0day-ci/archive/20251213/202512131318.6WaJp6sm-lkp@i...) compiler: aarch64-linux-gcc (GCC) 15.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251213/202512131318.6WaJp6sm-lkp@i...) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512131318.6WaJp6sm-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from include/linux/sunrpc/sched.h:19, from include/linux/sunrpc/auth.h:15, from include/linux/nfs_fs.h:31, from fs/nfs/nfs4state.c:44: include/linux/sunrpc/xdr.h: In function 'xdr_stream_decode_uint32_array': include/linux/sunrpc/xdr.h:512:17: warning: comparison is always false due to limited range of data type [-Wtype-limits] 512 | if (len > SIZE_MAX / sizeof(*p)) | ^ fs/nfs/nfs4state.c: In function 'nfs4_handle_reclaim_lease_error':
fs/nfs/nfs4state.c:1959:20: warning: this statement may fall through [-Wimplicit-fallthrough=] 1959 | if (clp->cl_cons_state == NFS_CS_SESSION_INITING) { | ^ fs/nfs/nfs4state.c:1963:9: note: here 1963 | case -EACCES: | ^~~~ fs/nfs/nfs4state.c:580: warning: Function parameter or member 'gfp_flags' not described in 'nfs4_get_state_owner'
vim +1959 fs/nfs/nfs4state.c 1934 1935 /* Set NFS4CLNT_LEASE_EXPIRED and reclaim reboot state for all v4.0 errors 1936 * and for recoverable errors on EXCHANGE_ID for v4.1 1937 */ 1938 static int nfs4_handle_reclaim_lease_error(struct nfs_client *clp, int status) 1939 { 1940 switch (status) { 1941 case -NFS4ERR_SEQ_MISORDERED: 1942 if (test_and_set_bit(NFS4CLNT_PURGE_STATE, &clp->cl_state)) 1943 return -ESERVERFAULT; 1944 /* Lease confirmation error: retry after purging the lease */ 1945 ssleep(1); 1946 clear_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state); 1947 break; 1948 case -NFS4ERR_STALE_CLIENTID: 1949 clear_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state); 1950 nfs4_state_start_reclaim_reboot(clp); 1951 break; 1952 case -NFS4ERR_CLID_INUSE: 1953 pr_err("NFS: Server %s reports our clientid is in use\n", 1954 clp->cl_hostname); 1955 nfs_mark_client_ready(clp, -EPERM); 1956 clear_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state); 1957 return -EPERM; 1958 case -ETIMEDOUT:
1959 if (clp->cl_cons_state == NFS_CS_SESSION_INITING) { 1960 nfs_mark_client_ready(clp, -EIO); 1961 return -EIO; 1962 } 1963 case -EACCES: 1964 case -NFS4ERR_DELAY: 1965 case -EAGAIN: 1966 ssleep(1); 1967 break; 1968 1969 case -NFS4ERR_MINOR_VERS_MISMATCH: 1970 if (clp->cl_cons_state == NFS_CS_SESSION_INITING) 1971 nfs_mark_client_ready(clp, -EPROTONOSUPPORT); 1972 dprintk("%s: exit with error %d for server %s\n", 1973 __func__, -EPROTONOSUPPORT, clp->cl_hostname); 1974 return -EPROTONOSUPPORT; 1975 case -NFS4ERR_NOT_SAME: /* FixMe: implement recovery 1976 * in nfs4_exchange_id */ 1977 default: 1978 dprintk("%s: exit with error %d for server %s\n", __func__, 1979 status, clp->cl_hostname); 1980 return status; 1981 } 1982 set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state); 1983 dprintk("%s: handled error %d for server %s\n", __func__, status, 1984 clp->cl_hostname); 1985 return 0; 1986 } 1987
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot