kernels/linux-2.4.0/fs/smbfs/proc.c
/*
 * Code common to mkdir and rmdir.
 */
Code common to mkdir and rmdir.
Code common to mkdir and rmdir .
static int
smb_proc_generic_command(struct dentry *dentry, __u8 command)
{
	struct smb_sb_info *server = server_from_dentry(dentry);
	char *p;
	int result;
	smb_lock_server(server);
      retry:
	p = smb_setup_header(server, command, 0, 0);
	*p++ = 4;
	result = smb_encode_path(server, p, dentry, NULL);
	if (result < 0)
		goto out;
	p += result;
	smb_setup_bcc(server, p);
	result = smb_request_ok(server, command, 0, 0);
	if (result < 0) {
		if (smb_retry(server))
			goto retry;
		goto out;
	}
	result = 0;
out:
	smb_unlock_server(server);
	return result;
}
static int smb_proc_generic_command ( struct dentry * dentry , __u8 command ) { struct smb_sb_info * server = server_from_dentry ( dentry ) ; char * p ; int result ; smb_lock_server ( server ) ; retry : p = smb_setup_header ( server , command , 0 , 0 ) ; * p ++ = 4 ; result = smb_encode_path ( server , p , dentry , NULL ) ; if ( result < 0 ) goto out ; p += result ; smb_setup_bcc ( server , p ) ; result = smb_request_ok ( server , command , 0 , 0 ) ; if ( result < 0 ) { if ( smb_retry ( server ) ) goto retry ; goto out ; } result = 0 ; out : smb_unlock_server ( server ) ; return result ; }
Code common to mkdir and rmdir.
Code common to mkdir and rmdir .