kernels/linux-2.4.0/fs/coda/file.c
/* exported from this file (used for dirs) */
exported from this file (used for dirs)
exported from this file ( used for dirs )
int coda_fsync(struct file *coda_file, struct dentry *coda_dentry, int datasync)
{
	struct inode *inode = coda_dentry->d_inode;
	struct dentry cont_dentry;
	int result = 0;
	ENTRY;
	coda_vfs_stat.fsync++;
	if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
	      S_ISLNK(inode->i_mode)))
		return -EINVAL;
	if ( inode->i_mapping == &inode->i_data ) {
		printk("coda_fsync: no container inode!\n");
                return -1; 
        }
	cont_dentry.d_inode = inode->i_mapping->host;
	down(&cont_dentry.d_inode->i_sem);
	result = file_fsync(NULL, &cont_dentry, datasync);
	up(&cont_dentry.d_inode->i_sem);
	if ( result == 0 && datasync == 0 ) {
		lock_kernel();
		result = venus_fsync(inode->i_sb, coda_i2f(inode));
		unlock_kernel();
	}
	return result;
}
int coda_fsync ( struct file * coda_file , struct dentry * coda_dentry , int datasync ) { struct inode * inode = coda_dentry -> d_inode ; struct dentry cont_dentry ; int result = 0 ; ENTRY ; coda_vfs_stat . fsync ++ ; if ( ! ( S_ISREG ( inode -> i_mode ) || S_ISDIR ( inode -> i_mode ) || S_ISLNK ( inode -> i_mode ) ) ) return - EINVAL ; if ( inode -> i_mapping == & inode -> i_data ) { printk ( " \n " ) ; return -1 ; } cont_dentry . d_inode = inode -> i_mapping -> host ; down ( & cont_dentry . d_inode -> i_sem ) ; result = file_fsync ( NULL , & cont_dentry , datasync ) ; up ( & cont_dentry . d_inode -> i_sem ) ; if ( result == 0 && datasync == 0 ) { lock_kernel ( ) ; result = venus_fsync ( inode -> i_sb , coda_i2f ( inode ) ) ; unlock_kernel ( ) ; } return result ; }
exported from this file (used for dirs)
exported from this file ( used for dirs )