2003-05-21 17:59:04

by Manuel Estrada Sainz

[permalink] [raw]
Subject: [PATCH] sysfs variable size files, lost dget, ...

diff --exclude=CVS -urN linux-2.5.orig/fs/sysfs/inode.c linux-2.5.mine/fs/sysfs/inode.c
--- linux-2.5.orig/fs/sysfs/inode.c 2003-05-17 20:44:03.000000000 +0200
+++ linux-2.5.mine/fs/sysfs/inode.c 2003-05-17 20:30:34.000000000 +0200
@@ -60,9 +60,10 @@
Proceed:
if (init)
error = init(inode);
- if (!error)
+ if (!error){
d_instantiate(dentry, inode);
- else
+ dget(dentry); /* Extra count - pin the dentry in core */
+ } else
iput(inode);
Done:
return error;


Attachments:
(No filename) (978.00 B)
sysfs-bin-flexible-size.diff (1.28 kB)
sysfs-bin-header.diff (717.00 B)
sysfs-bin-lost-dget.diff (476.00 B)
Download all attachments

2003-05-22 15:23:13

by Manuel Estrada Sainz

[permalink] [raw]
Subject: Re: [PATCH] sysfs variable size files, lost dget, ...

diff --exclude=CVS -urN linux-2.5.orig/fs/sysfs/inode.c linux-2.5.mine/fs/sysfs/inode.c
--- linux-2.5.orig/fs/sysfs/inode.c 2003-05-17 20:44:03.000000000 +0200
+++ linux-2.5.mine/fs/sysfs/inode.c 2003-05-22 16:53:59.000000000 +0200
@@ -60,9 +60,10 @@
Proceed:
if (init)
error = init(inode);
- if (!error)
+ if (!error) {
d_instantiate(dentry, inode);
- else
+ dget(dentry); /* Extra count - pin the dentry in core */
+ } else
iput(inode);
Done:
return error;


Attachments:
(No filename) (1.22 kB)
sysfs-bin-flexible-size.diff (1.52 kB)
sysfs-bin-header.diff (662.00 B)
sysfs-bin-lost-dget.diff (477.00 B)
Download all attachments