]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/sysfs/file.c
[XFS] kill the v_number member in struct bhv_vnode
[linux-2.6-omap-h63xx.git] / fs / sysfs / file.c
index cc497994b2a83dd91931d8d8b2f67bcc30aea80c..3e1cc062a74030687013da9c386476f3a164975f 100644 (file)
@@ -410,11 +410,12 @@ int sysfs_add_file(struct sysfs_dirent *dir_sd, const struct attribute *attr,
                sysfs_link_sibling(sd);
        }
 
-       if (sysfs_addrm_finish(&acxt))
-               return 0;
+       if (!sysfs_addrm_finish(&acxt)) {
+               sysfs_put(sd);
+               return -EEXIST;
+       }
 
-       sysfs_put(sd);
-       return -EEXIST;
+       return 0;
 }