sysfs: Only take active references on attributes.
[pandora-kernel.git] / fs / sysfs / file.c
index 4096136..e222b25 100644 (file)
@@ -509,6 +509,7 @@ int sysfs_add_file_mode(struct sysfs_dirent *dir_sd,
        if (!sd)
                return -ENOMEM;
        sd->s_attr.attr = (void *)attr;
+       sysfs_dirent_init_lockdep(sd);
 
        sysfs_addrm_start(&acxt, dir_sd);
        rc = sysfs_add_one(&acxt, sd);