projects
/
linux-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] sanitize ->permission() prototype
[linux-block.git]
/
fs
/
ocfs2
/
file.c
diff --git
a/fs/ocfs2/file.c
b/fs/ocfs2/file.c
index 9154c82d3258e5afc4b88fde94ecc68fc0aa91e2..be2dd95d3a1dc0c916229ad4deb643ed0ee841b0 100644
(file)
--- a/
fs/ocfs2/file.c
+++ b/
fs/ocfs2/file.c
@@
-1048,6
+1048,10
@@
int ocfs2_setattr(struct dentry *dentry, struct iattr *attr)
mlog_entry("(0x%p, '%.*s')\n", dentry,
dentry->d_name.len, dentry->d_name.name);
mlog_entry("(0x%p, '%.*s')\n", dentry,
dentry->d_name.len, dentry->d_name.name);
+ /* ensuring we don't even attempt to truncate a symlink */
+ if (S_ISLNK(inode->i_mode))
+ attr->ia_valid &= ~ATTR_SIZE;
+
if (attr->ia_valid & ATTR_MODE)
mlog(0, "mode change: %d\n", attr->ia_mode);
if (attr->ia_valid & ATTR_UID)
if (attr->ia_valid & ATTR_MODE)
mlog(0, "mode change: %d\n", attr->ia_mode);
if (attr->ia_valid & ATTR_UID)
@@
-1172,7
+1176,7
@@
bail:
return err;
}
return err;
}
-int ocfs2_permission(struct inode *inode, int mask
, struct nameidata *nd
)
+int ocfs2_permission(struct inode *inode, int mask)
{
int ret;
{
int ret;
@@
-2198,7
+2202,7
@@
static ssize_t ocfs2_file_aio_read(struct kiocb *iocb,
ret = generic_file_aio_read(iocb, iov, nr_segs, iocb->ki_pos);
if (ret == -EINVAL)
ret = generic_file_aio_read(iocb, iov, nr_segs, iocb->ki_pos);
if (ret == -EINVAL)
- mlog(
ML_ERROR
, "generic_file_aio_read returned -EINVAL\n");
+ mlog(
0
, "generic_file_aio_read returned -EINVAL\n");
/* buffered aio wouldn't have proper lock coverage today */
BUG_ON(ret == -EIOCBQUEUED && !(filp->f_flags & O_DIRECT));
/* buffered aio wouldn't have proper lock coverage today */
BUG_ON(ret == -EIOCBQUEUED && !(filp->f_flags & O_DIRECT));