projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fs: Preserve error code in get_empty_filp(), part 2
[deliverable/linux.git]
/
fs
/
anon_inodes.c
diff --git
a/fs/anon_inodes.c
b/fs/anon_inodes.c
index 28d39fb84ae38bcce08c5d6e54c0655453f83413..a14eb0c1cd8cf5c98b9c4894e1cfd20c675e04b8 100644
(file)
--- a/
fs/anon_inodes.c
+++ b/
fs/anon_inodes.c
@@
-131,7
+131,6
@@
struct file *anon_inode_getfile(const char *name,
struct qstr this;
struct path path;
struct file *file;
struct qstr this;
struct path path;
struct file *file;
- int error;
if (IS_ERR(anon_inode_inode))
return ERR_PTR(-ENODEV);
if (IS_ERR(anon_inode_inode))
return ERR_PTR(-ENODEV);
@@
-143,7
+142,7
@@
struct file *anon_inode_getfile(const char *name,
* Link the inode to a directory entry by creating a unique name
* using the inode sequence number.
*/
* Link the inode to a directory entry by creating a unique name
* using the inode sequence number.
*/
-
error = -ENOMEM
;
+
file = ERR_PTR(-ENOMEM)
;
this.name = name;
this.len = strlen(name);
this.hash = 0;
this.name = name;
this.len = strlen(name);
this.hash = 0;
@@
-160,9
+159,8
@@
struct file *anon_inode_getfile(const char *name,
d_instantiate(path.dentry, anon_inode_inode);
d_instantiate(path.dentry, anon_inode_inode);
- error = -ENFILE;
file = alloc_file(&path, OPEN_FMODE(flags), fops);
file = alloc_file(&path, OPEN_FMODE(flags), fops);
- if (
!file
)
+ if (
IS_ERR(file)
)
goto err_dput;
file->f_mapping = anon_inode_inode->i_mapping;
goto err_dput;
file->f_mapping = anon_inode_inode->i_mapping;
@@
-177,7
+175,7
@@
err_dput:
path_put(&path);
err_module:
module_put(fops->owner);
path_put(&path);
err_module:
module_put(fops->owner);
- return
ERR_PTR(error)
;
+ return
file
;
}
EXPORT_SYMBOL_GPL(anon_inode_getfile);
}
EXPORT_SYMBOL_GPL(anon_inode_getfile);
This page took
0.024995 seconds
and
5
git commands to generate.