linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: jack@suse.cz
Cc: linux-fsdevel@vger.kernel.org, dhowells@redhat.com,
	dedekind@infradead.org
Subject: [PATCH 2/3]: afs: remove manual O_SYNC handling
Date: Wed, 30 Sep 2009 22:16:51 +0200	[thread overview]
Message-ID: <20090930201651.GC18503@lst.de> (raw)
In-Reply-To: <20090930201608.GA18503@lst.de>

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@lst.de>

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;
 }

  parent reply	other threads:[~2009-09-30 20:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-30 20:16 sort out lose ends after the O_SYNC series Christoph Hellwig
2009-09-30 20:16 ` [PATCH 1/3] kill wait_on_page_writeback_range Christoph Hellwig
2009-10-01 11:20   ` Jan Kara
2009-09-30 20:16 ` Christoph Hellwig [this message]
2009-09-30 20:17 ` [PATCH 3/3] ubifs: remove manual O_SYNC handling Christoph Hellwig
2009-10-01  7:39   ` Artem Bityutskiy
2009-10-01  7:42     ` Artem Bityutskiy
2009-10-01 11:14       ` Jan Kara
2009-10-01 10:42 ` [PATCH 2/3]: afs: " David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090930201651.GC18503@lst.de \
    --to=hch@lst.de \
    --cc=dedekind@infradead.org \
    --cc=dhowells@redhat.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).