kernels/linux-2.4.0/fs/smbfs/proc.c
/*
 * Note: called with the server locked.
 */
called with the server locked.
called with the server locked .
static int
smb_proc_getattr_core(struct smb_sb_info *server, struct dentry *dir,
		      struct smb_fattr *fattr)
{
	int result;
	char *p;
      retry:
	p = smb_setup_header(server, SMBgetatr, 0, 0);
	*p++ = 4;
	result = smb_encode_path(server, p, dir, NULL);
	if (result < 0)
		goto out;
	p += result;
	smb_setup_bcc(server, p);
	if ((result = smb_request_ok(server, SMBgetatr, 10, 0)) < 0)
	{
		if (smb_retry(server))
			goto retry;
		goto out;
	}
	fattr->attr    = WVAL(server->packet, smb_vwv0);
	fattr->f_mtime = local2utc(server, DVAL(server->packet, smb_vwv1));
	fattr->f_size  = DVAL(server->packet, smb_vwv3);
	fattr->f_ctime = fattr->f_mtime; 
	fattr->f_atime = fattr->f_mtime; 
#ifdef SMBFS_DEBUG_TIMESTAMP
	printk("getattr_core: %s/%s, mtime=%ld\n",
	       DENTRY_PATH(dir), fattr->f_mtime);
#endif
	result = 0;
out:
	return result;
}
static int smb_proc_getattr_core ( struct smb_sb_info * server , struct dentry * dir , struct smb_fattr * fattr ) { int result ; char * p ; retry : p = smb_setup_header ( server , SMBgetatr , 0 , 0 ) ; * p ++ = 4 ; result = smb_encode_path ( server , p , dir , NULL ) ; if ( result < 0 ) goto out ; p += result ; smb_setup_bcc ( server , p ) ; if ( ( result = smb_request_ok ( server , SMBgetatr , 10 , 0 ) ) < 0 ) { if ( smb_retry ( server ) ) goto retry ; goto out ; } fattr -> attr = WVAL ( server -> packet , smb_vwv0 ) ; fattr -> f_mtime = local2utc ( server , DVAL ( server -> packet , smb_vwv1 ) ) ; fattr -> f_size = DVAL ( server -> packet , smb_vwv3 ) ; fattr -> f_ctime = fattr -> f_mtime ; fattr -> f_atime = fattr -> f_mtime ; #ifdef SMBFS_DEBUG_TIMESTAMP printk ( " \n " , DENTRY_PATH ( dir ) , fattr -> f_mtime ) ; #endif result = 0 ; out : return result ; }
Note: called with the server locked.
Note : called with the server locked .