Skip to contentSkip to conversation

fsnotify on removexattr

PATCH In review marijn ros 3 participants 3 messages Aug 5, 2005 VFS

lore
Share & tools
lore

marijn ros

author
#0 lore raw

I got wondering, why does fs_notify_xattr get called from setxattr in fs/xattr.c, but not from removexattr that is below it in the same file? Both seem to make changes to xattrs and both are exported as system calls.

Bye,
Marijn

Signature · 3 lines
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm
#1 lore raw

PATCH 1/1 fsnotify: hook on removexattr, too

Quoted 3 lines · marijn ros

I got wondering, why does fs_notify_xattr get called from setxattr in fs/xattr.c, but not from removexattr that is below it in the same file? Both seem to make changes to xattrs and both are exported as system calls.

We should.

Robert Love

Add fsnotify_xattr() hook to removexattr().

 fs/xattr.c |    2 ++
 1 files changed, 2 insertions(+)
fs/xattr.c +2 -0
diff -urN linux-2.6.13-rc5/fs/xattr.c linux/fs/xattr.c
@@ -307,6 +307,8 @@
 		down(&d->d_inode->i_sem);
 		error = d->d_inode->i_op->removexattr(d, kname);
 		up(&d->d_inode->i_sem);
+		if (!error)
+			fsnotify_xattr(d);
 	}
 out:
 	return error;
#2 lore raw

Re: [patch] fsnotify: hook on removexattr, too

Quoted 8 lines · Robert Love
Quoted 3 lines · marijn ros

I got wondering, why does fs_notify_xattr get called from setxattr in fs/xattr.c, but not from removexattr that is below it in the same file? Both seem to make changes to xattrs and both are exported as system calls.

We should.

Yes we should.

Signature · 1 line
John McCutchan <[email protected]>