Re: [patch] cgroup fs: avoid switching ->d_op on live dentry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;

Attachment: cgroup-fs-avoid-switching-d_op-on-live-dentry-v3.patch
Description: plain/text


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux