Loading fs/open.c +5 −5 Original line number Diff line number Diff line Loading @@ -135,13 +135,13 @@ static long do_sys_ftruncate(unsigned int fd, loff_t length, int small) struct inode *inode; struct dentry *dentry; struct file *file; int error; 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; Loading Loading @@ -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; } Loading Loading
fs/open.c +5 −5 Original line number Diff line number Diff line Loading @@ -135,13 +135,13 @@ static long do_sys_ftruncate(unsigned int fd, loff_t length, int small) struct inode *inode; struct dentry *dentry; struct file *file; int error; 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; Loading Loading @@ -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; } Loading