diff options
author | Li Zefan | 2008-07-21 18:06:36 +0800 |
---|---|---|
committer | Al Viro | 2008-07-26 20:53:24 -0400 |
commit | 88b387824fdaecb6ba0f471acf0aadf7d24739fd (patch) | |
tree | bd0e169bc0d2a802cd4ea58baf957bfa4602e956 /include | |
parent | 672b16b2f66c149888bd876a4f92342112205fe1 (diff) |
[PATCH] vfs: use kstrdup() and check failing allocation
- use kstrdup() instead of kmalloc() + memcpy()
- return NULL if allocating ->mnt_devname failed
- mnt_devname should be const
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mount.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/mount.h b/include/linux/mount.h index 4374d1adeb4b..b5efaa2132ab 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h @@ -47,7 +47,7 @@ struct vfsmount { struct list_head mnt_child; /* and going through their mnt_child */ int mnt_flags; /* 4 bytes hole on 64bits arches */ - char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ + const char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ struct list_head mnt_list; struct list_head mnt_expire; /* link in fs-specific expiry list */ struct list_head mnt_share; /* circular list of shared mounts */ |