Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2990
b: refs/heads/master
c: fed2fc1
h: refs/heads/master
v: v3
  • Loading branch information
Telemaque Ndizihiwe authored and Linus Torvalds committed Jun 23, 2005
1 parent 552b77a commit c1dd745
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 64ccd715d3cf498318b14b646ce5f97e7ab15bb5
refs/heads/master: fed2fc18a4567d613cd35115322257c6c6c710e9
18 changes: 7 additions & 11 deletions trunk/fs/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ EXPORT_SYMBOL(fd_install);
asmlinkage long sys_open(const char __user * filename, int flags, int mode)
{
char * tmp;
int fd, error;
int fd;

if (force_o_largefile())
flags |= O_LARGEFILE;
Expand All @@ -945,20 +945,16 @@ asmlinkage long sys_open(const char __user * filename, int flags, int mode)
fd = get_unused_fd();
if (fd >= 0) {
struct file *f = filp_open(tmp, flags, mode);
error = PTR_ERR(f);
if (IS_ERR(f))
goto out_error;
fd_install(fd, f);
if (IS_ERR(f)) {
put_unused_fd(fd);
fd = PTR_ERR(f);
} else {
fd_install(fd, f);
}
}
out:
putname(tmp);
}
return fd;

out_error:
put_unused_fd(fd);
fd = error;
goto out;
}
EXPORT_SYMBOL_GPL(sys_open);

Expand Down

0 comments on commit c1dd745

Please sign in to comment.