[systemd-devel] [patch] cgroup fs: avoid switching ->d_op on live dentry
Sedat Dilek
sedat.dilek at googlemail.com
Tue Dec 21 07:28:30 PST 2010
What about using d_set_d_op() ?
- Sedat -
$ diff -Naur orig/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch
cgroup-fs-avoid-switching-d_op-on-live-dentry-v3.patch
--- orig/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch
2010-12-21 09:31:38.649601964 +0100
+++ cgroup-fs-avoid-switching-d_op-on-live-dentry-v3.patch
2010-12-21 16:23:29.147497577 +0100
@@ -21,6 +21,9 @@
---
One of the patches in my vfs scaling series tripped over this, comments?
+v2: Refreshed to fit linux-next (next-20101220)
+v3: Use d_set_d_op()
+
kernel/cgroup.c | 27 ++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)
@@ -68,7 +71,7 @@
+ if (dentry->d_name.len > NAME_MAX)
+ return ERR_PTR(-ENAMETOOLONG);
-+ dentry->d_op = &cgroup_dentry_operations;
++ d_set_d_op(dentry, &cgroup_dentry_operations);
+ d_add(dentry, NULL);
+ return NULL;
+}
@@ -83,7 +86,7 @@
inode->i_size = 0;
inode->i_fop = &cgroup_file_operations;
}
-- dentry->d_op = &cgroup_dops;
+- d_set_d_op(dentry, &cgroup_dops);
d_instantiate(dentry, inode);
dget(dentry); /* Extra count - pin the dentry in core */
return 0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cgroup-fs-avoid-switching-d_op-on-live-dentry-v3.patch
Type: plain/text
Size: 3302 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20101221/f2000d2c/attachment-0001.bin>
More information about the systemd-devel
mailing list