diff options
| -rw-r--r-- | fs/sysfs/dir.c | 7 | ||||
| -rw-r--r-- | fs/sysfs/inode.c | 7 | ||||
| -rw-r--r-- | fs/sysfs/sysfs.h | 2 |
3 files changed, 7 insertions, 9 deletions
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c index 620603296c6c..a0da2b05a754 100644 --- a/fs/sysfs/dir.c +++ b/fs/sysfs/dir.c | |||
| @@ -609,11 +609,8 @@ static void sysfs_drop_dentry(struct sysfs_dirent *sd) | |||
| 609 | * | 609 | * |
| 610 | * LOCKING: | 610 | * LOCKING: |
| 611 | * All mutexes acquired by sysfs_addrm_start() are released. | 611 | * All mutexes acquired by sysfs_addrm_start() are released. |
| 612 | * | ||
| 613 | * RETURNS: | ||
| 614 | * Number of added/removed sysfs_dirents since sysfs_addrm_start(). | ||
| 615 | */ | 612 | */ |
| 616 | int sysfs_addrm_finish(struct sysfs_addrm_cxt *acxt) | 613 | void sysfs_addrm_finish(struct sysfs_addrm_cxt *acxt) |
| 617 | { | 614 | { |
| 618 | /* release resources acquired by sysfs_addrm_start() */ | 615 | /* release resources acquired by sysfs_addrm_start() */ |
| 619 | mutex_unlock(&sysfs_mutex); | 616 | mutex_unlock(&sysfs_mutex); |
| @@ -639,8 +636,6 @@ int sysfs_addrm_finish(struct sysfs_addrm_cxt *acxt) | |||
| 639 | sysfs_deactivate(sd); | 636 | sysfs_deactivate(sd); |
| 640 | sysfs_put(sd); | 637 | sysfs_put(sd); |
| 641 | } | 638 | } |
| 642 | |||
| 643 | return acxt->cnt; | ||
| 644 | } | 639 | } |
| 645 | 640 | ||
| 646 | /** | 641 | /** |
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index efb4062fe099..e22db6cd4df7 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c | |||
| @@ -200,7 +200,10 @@ int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const char *name) | |||
| 200 | if (sd) | 200 | if (sd) |
| 201 | sysfs_remove_one(&acxt, sd); | 201 | sysfs_remove_one(&acxt, sd); |
| 202 | 202 | ||
| 203 | if (sysfs_addrm_finish(&acxt)) | 203 | sysfs_addrm_finish(&acxt); |
| 204 | |||
| 205 | if (sd) | ||
| 204 | return 0; | 206 | return 0; |
| 205 | return -ENOENT; | 207 | else |
| 208 | return -ENOENT; | ||
| 206 | } | 209 | } |
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h index bb3f0c999b15..043675471031 100644 --- a/fs/sysfs/sysfs.h +++ b/fs/sysfs/sysfs.h | |||
| @@ -66,7 +66,7 @@ extern int sysfs_add_one(struct sysfs_addrm_cxt *acxt, | |||
| 66 | struct sysfs_dirent *sd); | 66 | struct sysfs_dirent *sd); |
| 67 | extern void sysfs_remove_one(struct sysfs_addrm_cxt *acxt, | 67 | extern void sysfs_remove_one(struct sysfs_addrm_cxt *acxt, |
| 68 | struct sysfs_dirent *sd); | 68 | struct sysfs_dirent *sd); |
| 69 | extern int sysfs_addrm_finish(struct sysfs_addrm_cxt *acxt); | 69 | extern void sysfs_addrm_finish(struct sysfs_addrm_cxt *acxt); |
| 70 | 70 | ||
| 71 | extern struct inode * sysfs_get_inode(struct sysfs_dirent *sd); | 71 | extern struct inode * sysfs_get_inode(struct sysfs_dirent *sd); |
| 72 | extern void sysfs_instantiate(struct dentry *dentry, struct inode *inode); | 72 | extern void sysfs_instantiate(struct dentry *dentry, struct inode *inode); |
