Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25896
b: refs/heads/master
c: 385910f
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Apr 18, 2006
1 parent 4df54c9 commit badd79c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 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: 0a489cb3b6a7b277030cdbc97c2c65905db94536
refs/heads/master: 385910f2b275a636238f70844f1b6da9fda6f2da
16 changes: 14 additions & 2 deletions trunk/fs/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ static long do_sys_ftruncate(unsigned int fd, loff_t length, int small)
asmlinkage long sys_ftruncate(unsigned int fd, unsigned long length)
{
long ret = do_sys_ftruncate(fd, length, 1);
/* avoid REGPARM breakage on x86: */
prevent_tail_call(ret);
return ret;
}
Expand All @@ -346,6 +347,7 @@ asmlinkage long sys_truncate64(const char __user * path, loff_t length)
asmlinkage long sys_ftruncate64(unsigned int fd, loff_t length)
{
long ret = do_sys_ftruncate(fd, length, 0);
/* avoid REGPARM breakage on x86: */
prevent_tail_call(ret);
return ret;
}
Expand Down Expand Up @@ -1097,20 +1099,30 @@ long do_sys_open(int dfd, const char __user *filename, int flags, int mode)

asmlinkage long sys_open(const char __user *filename, int flags, int mode)
{
long ret;

if (force_o_largefile())
flags |= O_LARGEFILE;

return do_sys_open(AT_FDCWD, filename, flags, mode);
ret = do_sys_open(AT_FDCWD, filename, flags, mode);
/* avoid REGPARM breakage on x86: */
prevent_tail_call(ret);
return ret;
}
EXPORT_SYMBOL_GPL(sys_open);

asmlinkage long sys_openat(int dfd, const char __user *filename, int flags,
int mode)
{
long ret;

if (force_o_largefile())
flags |= O_LARGEFILE;

return do_sys_open(dfd, filename, flags, mode);
ret = do_sys_open(dfd, filename, flags, mode);
/* avoid REGPARM breakage on x86: */
prevent_tail_call(ret);
return ret;
}
EXPORT_SYMBOL_GPL(sys_openat);

Expand Down

0 comments on commit badd79c

Please sign in to comment.