diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-02 13:53:07 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-02 13:53:07 -0700 |
commit | be2e88011bd800222bfd7b477c727966f93186a9 (patch) | |
tree | 089ab03feb7cfde6a1b548e9de70ee35860d393d /fs/ocfs2/file.c | |
parent | d626e3bf728c47746f2129aa00c775d4e8c2a73b (diff) | |
parent | 4ba1c5bfd2e5a6c9528eb7777b66c297e70f61ca (diff) | |
download | kernel_samsung_smdk4412-be2e88011bd800222bfd7b477c727966f93186a9.zip kernel_samsung_smdk4412-be2e88011bd800222bfd7b477c727966f93186a9.tar.gz kernel_samsung_smdk4412-be2e88011bd800222bfd7b477c727966f93186a9.tar.bz2 |
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
ocfs2: Use GFP_NOFS in kmalloc during localalloc window move
ocfs2: Allow uid/gid/perm changes of symlinks
ocfs2/dlm: dlmdebug.c: make 2 functions static
ocfs2: make struct o2cb_stack_ops static
ocfs2: make struct ocfs2_control_device static
ocfs2: Correct merge of 52f7c21 (Move /sys/o2cb to /sys/fs/o2cb)
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r-- | fs/ocfs2/file.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 9154c82d3..57e0d30 100644 --- 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); + /* 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) |