Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328988
b: refs/heads/master
c: bf2965d
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Sep 27, 2012
1 parent 351c2ce commit 2c176f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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: f6d2ac5ca79d1fd468dbc77e488aec06e86f3035
refs/heads/master: bf2965d5b5950d09e934ea5d961d79d0ed1fae7e
10 changes: 5 additions & 5 deletions trunk/fs/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,16 @@ SYSCALL_DEFINE2(truncate, const char __user *, path, long, length)

static long do_sys_ftruncate(unsigned int fd, loff_t length, int small)
{
struct inode * inode;
struct inode *inode;
struct dentry *dentry;
struct file * file;
int error;
struct file *file;
int error, fput_needed;

error = -EINVAL;
if (length < 0)
goto out;
error = -EBADF;
file = fget(fd);
file = fget_light(fd, &fput_needed);
if (!file)
goto out;

Expand Down Expand Up @@ -172,7 +172,7 @@ static long do_sys_ftruncate(unsigned int fd, loff_t length, int small)
error = do_truncate(dentry, length, ATTR_MTIME|ATTR_CTIME, file);
sb_end_write(inode->i_sb);
out_putf:
fput(file);
fput_light(file, fput_needed);
out:
return error;
}
Expand Down

0 comments on commit 2c176f1

Please sign in to comment.