The patch titled nbd: check the return value of sysfs_create_file has been removed from the -mm tree. Its filename was nbd-check-the-return-value-of-sysfs_create_file.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ Subject: nbd: check the return value of sysfs_create_file From: WANG Cong <xiyou.wangcong@xxxxxxxxx> [akpm@xxxxxxxxxxxxxxxxxxxx: fix it] Signed-off-by: WANG Cong <xiyou.wangcong@xxxxxxxxx> Cc: Paul Clements <paul.clements@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/block/nbd.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff -puN drivers/block/nbd.c~nbd-check-the-return-value-of-sysfs_create_file drivers/block/nbd.c --- a/drivers/block/nbd.c~nbd-check-the-return-value-of-sysfs_create_file +++ a/drivers/block/nbd.c @@ -366,20 +366,25 @@ static struct disk_attribute pid_attr = .show = pid_show, }; -static void nbd_do_it(struct nbd_device *lo) +static int nbd_do_it(struct nbd_device *lo) { struct request *req; + int ret; BUG_ON(lo->magic != LO_MAGIC); lo->pid = current->pid; - sysfs_create_file(&lo->disk->kobj, &pid_attr.attr); + ret = sysfs_create_file(&lo->disk->kobj, &pid_attr.attr); + if (ret) { + printk(KERN_ERR "nbd: sysfs_create_file failed!"); + return ret; + } while ((req = nbd_read_stat(lo)) != NULL) nbd_end_request(req); sysfs_remove_file(&lo->disk->kobj, &pid_attr.attr); - return; + return 0; } static void nbd_clear_que(struct nbd_device *lo) @@ -569,7 +574,9 @@ static int nbd_ioctl(struct inode *inode case NBD_DO_IT: if (!lo->file) return -EINVAL; - nbd_do_it(lo); + error = nbd_do_it(lo); + if (error) + return error; /* on return tidy up in case we have a signal */ /* Forcibly shutdown the socket causing all listeners * to error _ Patches currently in -mm which might be from xiyou.wangcong@xxxxxxxxx are origin.patch partitions-check-the-return-value-of-kobject_add-etc.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html