mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
o kmalloc error check
o error file mode The 1st Jan 1970 date I'm seeing in /dev is a devfs issue I think.
This commit is contained in:
parent
fd36a66ccc
commit
765d06119f
@ -100,7 +100,7 @@ static struct file *open_error_file(struct file *table)
|
||||
table->f_vfsmnt->mnt_mountpoint->d_name.name,
|
||||
table->f_dentry->d_parent->d_name.name,
|
||||
table->f_dentry->d_name.name);
|
||||
f = filp_open(name, O_WRONLY|O_TRUNC|O_CREAT, 0);
|
||||
f = filp_open(name, O_WRONLY|O_TRUNC|O_CREAT, S_IRUGO);
|
||||
kfree(name);
|
||||
|
||||
if (f)
|
||||
|
@ -474,6 +474,10 @@ static inline int __any_old_dev(void)
|
||||
static struct mapped_device *alloc_dev(int minor)
|
||||
{
|
||||
struct mapped_device *md = kmalloc(sizeof(*md), GFP_KERNEL);
|
||||
|
||||
if (!md)
|
||||
return 0;
|
||||
|
||||
memset(md, 0, sizeof(*md));
|
||||
|
||||
down_write(&_dev_lock);
|
||||
@ -625,7 +629,7 @@ int dm_create(const char *name, int minor)
|
||||
return -ENXIO;
|
||||
|
||||
if (!(md = alloc_dev(minor)))
|
||||
return -ENOMEM;
|
||||
return -ENXIO;
|
||||
|
||||
down_write(&_dev_lock);
|
||||
if (__find_by_name(name)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user