From: Christoph Hellwig Date: Wed, 30 Sep 2009 20:16:51 +0000 (+0200) Subject: afs: remove manual O_SYNC handling X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=027cf316afff03d310281709314fbc0899984759;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git afs: remove manual O_SYNC handling generic_file_aio_write already calls into ->fsync to handle O_SYNC/O_DSYNC. Remove the duplicate manual invocation. Signed-off-by: Christoph Hellwig Signed-off-by: Jan Kara --- diff --git a/fs/afs/write.c b/fs/afs/write.c index 6be1bc31616a..5e15a21dbf9f 100644 --- a/fs/afs/write.c +++ b/fs/afs/write.c @@ -671,7 +671,6 @@ ssize_t afs_file_write(struct kiocb *iocb, const struct iovec *iov, 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 *iocb, const struct iovec *iov, 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; }