Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

sysfs(2): fs_index() argument is _not_ a pathname

... it's a filesystem type name.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro 0787a93b 9b323d2f

+3 -6
+3 -6
fs/filesystems.c
··· 132 132 static int fs_index(const char __user * __name) 133 133 { 134 134 struct file_system_type * tmp; 135 - struct filename *name; 135 + char *name __free(kfree) = strndup_user(__name, PATH_MAX); 136 136 int err, index; 137 137 138 - name = getname(__name); 139 - err = PTR_ERR(name); 140 138 if (IS_ERR(name)) 141 - return err; 139 + return PTR_ERR(name); 142 140 143 141 err = -EINVAL; 144 142 read_lock(&file_systems_lock); 145 143 for (tmp=file_systems, index=0 ; tmp ; tmp=tmp->next, index++) { 146 - if (strcmp(tmp->name, name->name) == 0) { 144 + if (strcmp(tmp->name, name) == 0) { 147 145 err = index; 148 146 break; 149 147 } 150 148 } 151 149 read_unlock(&file_systems_lock); 152 - putname(name); 153 150 return err; 154 151 } 155 152