patch-2.4.20 linux-2.4.20/fs/open.c
Next file: linux-2.4.20/fs/partitions/Config.in
Previous file: linux-2.4.20/fs/nls/nls_cp1250.c
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
Thu Nov 28 15:53:15 2002
- Orig file:
linux-2.4.19/fs/open.c
- Orig date:
Fri Aug 2 17:39:45 2002
diff -urN linux-2.4.19/fs/open.c linux-2.4.20/fs/open.c
@@ -385,17 +385,8 @@
{
int error;
struct nameidata nd;
- char *name;
- name = getname(filename);
- error = PTR_ERR(name);
- if (IS_ERR(name))
- goto out;
-
- error = 0;
- if (path_init(name,LOOKUP_POSITIVE|LOOKUP_FOLLOW|LOOKUP_DIRECTORY,&nd))
- error = path_walk(name, &nd);
- putname(name);
+ error = __user_walk(filename,LOOKUP_POSITIVE|LOOKUP_FOLLOW|LOOKUP_DIRECTORY,&nd);
if (error)
goto out;
@@ -445,17 +436,9 @@
{
int error;
struct nameidata nd;
- char *name;
-
- name = getname(filename);
- error = PTR_ERR(name);
- if (IS_ERR(name))
- goto out;
- path_init(name, LOOKUP_POSITIVE | LOOKUP_FOLLOW |
+ error = __user_walk(filename, LOOKUP_POSITIVE | LOOKUP_FOLLOW |
LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd);
- error = path_walk(name, &nd);
- putname(name);
if (error)
goto out;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)