Re: [PATCH 2/9] exofs: file and file_inode operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 16 Dec 2008 17:17:25 +0200
Boaz Harrosh <bharrosh@xxxxxxxxxxx> wrote:

> 
> implementation of the file_operations and inode_operations for
> regular data files.
> 
> Most file_operations are generic vfs implementations except:
> - exofs_truncate will truncate the OSD object as well
> - Generic file_fsync is not good for none_bd devices so open code it
> - The default for .flush in Linux is todo nothing so call exofs_fsync
>   on the file.
> 
> ...
>
> +int exofs_file_fsync(struct file *filp, struct dentry *dentry, int datasync)
> +{
> +	int ret1, ret2;
> +	struct address_space *mapping = filp->f_mapping;
> +
> +	ret1 = filemap_write_and_wait(mapping);
> +	ret2 = file_fsync(filp, dentry, datasync);
> +
> +	return ret1 ? : ret2;

mutter.  That gccism always makes me fall over dazed and confused. 
Maybe that's just me.

Did we really want to call file_fsync() if filemap_write_and_wait() failed?

> +}
>
> ...
>
> +struct file_operations exofs_file_operations = {
> +struct inode_operations exofs_file_inode_operations = {

These both could/should be made const.

> +	.truncate	= exofs_truncate,
> +	.setattr	= exofs_setattr,
> +};

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux