From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaegeuk Kim Subject: [PATCH 08/11] f2fs: should not truncate any inline_dentry Date: Sun, 19 Oct 2014 22:19:36 -0700 Message-ID: <1413782379-11758-8-git-send-email-jaegeuk@kernel.org> References: <1413782379-11758-1-git-send-email-jaegeuk@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Xg5Nx-0007qY-Uq for linux-f2fs-devel@lists.sourceforge.net; Mon, 20 Oct 2014 05:20:01 +0000 Received: from mail.kernel.org ([198.145.19.201]) by sog-mx-3.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1Xg5Nx-0000tV-8w for linux-f2fs-devel@lists.sourceforge.net; Mon, 20 Oct 2014 05:20:01 +0000 In-Reply-To: <1413782379-11758-1-git-send-email-jaegeuk@kernel.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim If the inode has inline_dentry, we should not truncate any block indices. Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index d054e0e..402e381 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -471,7 +471,7 @@ int truncate_blocks(struct inode *inode, u64 from, bool lock) trace_f2fs_truncate_blocks_enter(inode, from); - if (f2fs_has_inline_data(inode)) + if (f2fs_has_inline_data(inode) || f2fs_has_inline_dentry(inode)) goto done; free_from = (pgoff_t) -- 2.1.1 ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho