ocfs2-devel.oss.oracle.com archive mirror
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH 1/1] ocfs2: Allow uid/gid/perm changes of symlinks
@ 2008-04-18 17:23 Sunil Mushran
  2008-04-18 17:35 ` Mark Fasheh
  0 siblings, 1 reply; 3+ messages in thread
From: Sunil Mushran @ 2008-04-18 17:23 UTC (permalink / raw)
  To: ocfs2-devel

This patch adds the ability to change attributes of a symlink.
Fixes oss bugzilla#963
http://oss.oracle.com/bugzilla/show_bug.cgi?id=963

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
---
 fs/ocfs2/file.c    |    4 ++++
 fs/ocfs2/symlink.c |    2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 9154c82..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)
diff --git a/fs/ocfs2/symlink.c b/fs/ocfs2/symlink.c
index 7134007..ba9dbb5 100644
--- a/fs/ocfs2/symlink.c
+++ b/fs/ocfs2/symlink.c
@@ -167,9 +167,11 @@ const struct inode_operations ocfs2_symlink_inode_operations = {
 	.readlink	= page_readlink,
 	.follow_link	= ocfs2_follow_link,
 	.getattr	= ocfs2_getattr,
+	.setattr	= ocfs2_setattr,
 };
 const struct inode_operations ocfs2_fast_symlink_inode_operations = {
 	.readlink	= ocfs2_readlink,
 	.follow_link	= ocfs2_follow_link,
 	.getattr	= ocfs2_getattr,
+	.setattr	= ocfs2_setattr,
 };
-- 
1.5.3.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Ocfs2-devel] [PATCH 1/1] ocfs2: Allow uid/gid/perm changes of symlinks
  2008-04-18 17:23 [Ocfs2-devel] [PATCH 1/1] ocfs2: Allow uid/gid/perm changes of symlinks Sunil Mushran
@ 2008-04-18 17:35 ` Mark Fasheh
  2008-04-19  3:42   ` Tao Ma
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Fasheh @ 2008-04-18 17:35 UTC (permalink / raw)
  To: ocfs2-devel

On Fri, Apr 18, 2008 at 10:23:53AM -0700, Sunil Mushran wrote:
> This patch adds the ability to change attributes of a symlink.
> Fixes oss bugzilla#963
> http://oss.oracle.com/bugzilla/show_bug.cgi?id=963

Ok, that looks good - thanks.
	--Mark

--
Mark Fasheh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Ocfs2-devel] [PATCH 1/1] ocfs2: Allow uid/gid/perm changes of symlinks
  2008-04-18 17:35 ` Mark Fasheh
@ 2008-04-19  3:42   ` Tao Ma
  0 siblings, 0 replies; 3+ messages in thread
From: Tao Ma @ 2008-04-19  3:42 UTC (permalink / raw)
  To: ocfs2-devel

Hi Mark,
	I have read all the materials. Just curious about why ocfs2 super block 
don't support ->dirty_inode like ext3 does. If we support it and call 
ocfs2_make_inode_dirty in it, it should be OK. So is there any reason 
why we don't support ->dirty_inode?
Thanks.

Regards,
Tao

Mark Fasheh wrote:
> On Fri, Apr 18, 2008 at 10:23:53AM -0700, Sunil Mushran wrote:
>> This patch adds the ability to change attributes of a symlink.
>> Fixes oss bugzilla#963
>> http://oss.oracle.com/bugzilla/show_bug.cgi?id=963
> 
> Ok, that looks good - thanks.
> 	--Mark
> 
> --
> Mark Fasheh
> 
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-19  3:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-18 17:23 [Ocfs2-devel] [PATCH 1/1] ocfs2: Allow uid/gid/perm changes of symlinks Sunil Mushran
2008-04-18 17:35 ` Mark Fasheh
2008-04-19  3:42   ` Tao Ma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).