From patchwork Mon Jun 7 03:38:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miao Xie X-Patchwork-Id: 104617 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o573bGBS009883 for ; Mon, 7 Jun 2010 03:37:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756126Ab0FGDhO (ORCPT ); Sun, 6 Jun 2010 23:37:14 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:56133 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1756115Ab0FGDhN (ORCPT ); Sun, 6 Jun 2010 23:37:13 -0400 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id BE1EA170095; Mon, 7 Jun 2010 11:37:10 +0800 (CST) Received: from fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id o573YrHR018343; Mon, 7 Jun 2010 11:34:54 +0800 Received: from [127.0.0.1] (unknown [10.167.141.211]) by fnst.cn.fujitsu.com (Postfix) with ESMTPA id 7593210C10D; Mon, 7 Jun 2010 11:41:07 +0800 (CST) Message-ID: <4C0C69CB.2070104@cn.fujitsu.com> Date: Mon, 07 Jun 2010 11:38:51 +0800 From: Miao Xie Reply-To: miaox@cn.fujitsu.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: Chris Mason CC: Linux Btrfs , Linux-Kernel Subject: [PATCH] btrfs: fix cannot use the loop device Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 07 Jun 2010 03:37:16 +0000 (UTC) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 79437c5..abcb918 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1197,6 +1197,7 @@ static int btrfs_file_mmap(struct file *filp, struct vm_area_struct *vma) const struct file_operations btrfs_file_operations = { .llseek = generic_file_llseek, .read = do_sync_read, + .write = do_sync_write, .aio_read = generic_file_aio_read, .splice_read = generic_file_splice_read, .aio_write = btrfs_file_aio_write,