diff options
author | Tejun Heo <tj@kernel.org> | 2013-10-24 11:49:08 -0400 |
---|---|---|
committer | Pawel Osmialowski <p.osmialowsk@mcdsrvbld02.digital.local> | 2015-03-27 15:17:52 +0100 |
commit | df80ef68b223c20802f5b97db0fb7a69e826274d (patch) | |
tree | 0dc144d8e4d193b748553d600958a9af6ca4088a | |
parent | 78dc7509b5ab679a13f893c46abd76a21ece3023 (diff) | |
download | linux-3.10-df80ef68b223c20802f5b97db0fb7a69e826274d.tar.gz linux-3.10-df80ef68b223c20802f5b97db0fb7a69e826274d.tar.bz2 linux-3.10-df80ef68b223c20802f5b97db0fb7a69e826274d.zip |
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@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/sysfs/sysfs.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h index 44823503b35..b43fedd888b 100644 --- a/fs/sysfs/sysfs.h +++ b/fs/sysfs/sysfs.h @@ -126,7 +126,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; } |