generic_file_aio_write already calls into ->fsync to handle O_SYNC/O_DSYNC. Remove the duplicate manual invocation. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Index: linux-2.6/fs/afs/write.c =================================================================== --- linux-2.6.orig/fs/afs/write.c 2009-09-30 13:59:20.550278942 -0300 +++ linux-2.6/fs/afs/write.c 2009-09-30 14:01:32.739005666 -0300 @@ -671,7 +671,6 @@ ssize_t afs_file_write(struct kiocb *ioc struct afs_vnode *vnode = AFS_FS_I(dentry->d_inode); ssize_t result; size_t count = iov_length(iov, nr_segs); - int ret; _enter("{%x.%u},{%zu},%lu,", vnode->fid.vid, vnode->fid.vnode, count, nr_segs); @@ -691,14 +690,6 @@ ssize_t afs_file_write(struct kiocb *ioc return result; } - /* return error values for O_SYNC and IS_SYNC() */ - if (IS_SYNC(&vnode->vfs_inode) || iocb->ki_filp->f_flags & O_DSYNC) { - ret = afs_fsync(iocb->ki_filp, dentry, - (iocb->ki_filp->f_flags & __O_SYNC) ? 0 : 1); - if (ret < 0) - result = ret; - } - _leave(" = %zd", result); return result; } -- 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