From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: [PATCH v7 07/22] Replace the XIP page fault handler with the DAX page fault handler Date: Wed, 9 Apr 2014 16:51:11 -0400 Message-ID: <20140409205111.GG5727@linux.intel.com> References: <20140409102758.GM32103@quack.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Matthew Wilcox , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org To: Jan Kara Return-path: Content-Disposition: inline In-Reply-To: <20140409102758.GM32103@quack.suse.cz> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org On Wed, Apr 09, 2014 at 12:27:58PM +0200, Jan Kara wrote: > > + if (unlikely(vmf->pgoff >= size)) { > > + mutex_unlock(&mapping->i_mmap_mutex); > > + goto sigbus; > You need to release the block you've got from the filesystem in case of > error here an below. What's the API to do that? Call inode->i_op->setattr()? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964985AbaDIUwY (ORCPT ); Wed, 9 Apr 2014 16:52:24 -0400 Received: from mga11.intel.com ([192.55.52.93]:9252 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933590AbaDIUwX (ORCPT ); Wed, 9 Apr 2014 16:52:23 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,828,1389772800"; d="scan'208";a="510390472" Date: Wed, 9 Apr 2014 16:51:11 -0400 From: Matthew Wilcox To: Jan Kara Cc: Matthew Wilcox , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 07/22] Replace the XIP page fault handler with the DAX page fault handler Message-ID: <20140409205111.GG5727@linux.intel.com> References: <20140409102758.GM32103@quack.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140409102758.GM32103@quack.suse.cz> User-Agent: Mutt/1.5.22 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 09, 2014 at 12:27:58PM +0200, Jan Kara wrote: > > + if (unlikely(vmf->pgoff >= size)) { > > + mutex_unlock(&mapping->i_mmap_mutex); > > + goto sigbus; > You need to release the block you've got from the filesystem in case of > error here an below. What's the API to do that? Call inode->i_op->setattr()?