xfs: fixup xfs_attr_get_ilocked
The comment mentioned the wrong lock. Also add an ASSERT to assert this locking precondition. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
committed by
Darrick J. Wong
parent
cd87d86792
commit
cf69f8248c
@@ -114,12 +114,14 @@ xfs_inode_hasattr(
|
|||||||
* Overall external interface routines.
|
* Overall external interface routines.
|
||||||
*========================================================================*/
|
*========================================================================*/
|
||||||
|
|
||||||
/* Retrieve an extended attribute and its value. Must have iolock. */
|
/* Retrieve an extended attribute and its value. Must have ilock. */
|
||||||
int
|
int
|
||||||
xfs_attr_get_ilocked(
|
xfs_attr_get_ilocked(
|
||||||
struct xfs_inode *ip,
|
struct xfs_inode *ip,
|
||||||
struct xfs_da_args *args)
|
struct xfs_da_args *args)
|
||||||
{
|
{
|
||||||
|
ASSERT(xfs_isilocked(ip, XFS_ILOCK_SHARED | XFS_ILOCK_EXCL));
|
||||||
|
|
||||||
if (!xfs_inode_hasattr(ip))
|
if (!xfs_inode_hasattr(ip))
|
||||||
return -ENOATTR;
|
return -ENOATTR;
|
||||||
else if (ip->i_d.di_aformat == XFS_DINODE_FMT_LOCAL)
|
else if (ip->i_d.di_aformat == XFS_DINODE_FMT_LOCAL)
|
||||||
|
|||||||
Reference in New Issue
Block a user