[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1382629780-10006-3-git-send-email-tj@kernel.org>
Date: Thu, 24 Oct 2013 11:49:08 -0400
From: Tejun Heo <tj@...nel.org>
To: gregkh@...uxfoundation.org
Cc: kay@...y.org, linux-kernel@...r.kernel.org, ebiederm@...ssion.com,
bhelgaas@...gle.com, Tejun Heo <tj@...nel.org>
Subject: [PATCH 02/34] sysfs: honor bin_attr.attr.ignore_lockdep
ignore_lockdep is currently honored only for regular files. There's
no reason to ignore it for bin files. Update sysfs_ignore_lockdep()
so that bin_attr.attr.ignore_lockdep works too.
While this doesn't have any in-kernel user, this unifies the behaviors
between regular and bin files and will help later changes.
Signed-off-by: Tejun Heo <tj@...nel.org>
---
fs/sysfs/sysfs.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
index c095d952..bdce845 100644
--- a/fs/sysfs/sysfs.h
+++ b/fs/sysfs/sysfs.h
@@ -114,7 +114,9 @@ do { \
/* Test for attributes that want to ignore lockdep for read-locking */
static inline bool sysfs_ignore_lockdep(struct sysfs_dirent *sd)
{
- return sysfs_type(sd) == SYSFS_KOBJ_ATTR &&
+ int type = sysfs_type(sd);
+
+ return (type == SYSFS_KOBJ_ATTR || type == SYSFS_KOBJ_BIN_ATTR) &&
sd->s_attr.attr->ignore_lockdep;
}
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists