diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 6f99be0228452b7bb3544c6cd47f1268e62e24e1..e02fafca02c7bec40a72a707c3e2d22745a4cdb3 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -410,10 +410,6 @@ static int fuse_flush(struct file *file, fl_owner_t id) if (is_bad_inode(inode)) return -EIO; - err = 0; - if (fc->no_flush) - goto inval_attr_out; - err = write_inode_now(inode, 1); if (err) return err; @@ -426,6 +422,10 @@ static int fuse_flush(struct file *file, fl_owner_t id) if (err) return err; + err = 0; + if (fc->no_flush) + goto inval_attr_out; + req = fuse_get_req_nofail_nopages(fc, file); memset(&inarg, 0, sizeof(inarg)); inarg.fh = ff->fh;