From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tao Ma Subject: Why there is no mutex_lock in vfs_getxattr. Date: Mon, 14 Jul 2008 17:06:03 +0800 Message-ID: <487B16FB.2040805@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org To: linux-fsdevel@vger.kernel.org Return-path: Received: from agminet01.oracle.com ([141.146.126.228]:47025 "EHLO agminet01.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753917AbYGNJGb (ORCPT ); Mon, 14 Jul 2008 05:06:31 -0400 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi all, When we use vfs_setxattr we call mutex_lock(&inode->i_mutex) to lock the inode. Then why there is no mutex_lock in vfs_getxattr? Is there any reason for it? And how can I prevent getting the stale xattr if set/get happen in the same time? Just let the actual file system implement it by itself? Regards, Tao