| From | Subject | Date |
|---|---|---|
| Dmitri Vorobiev | Re: [PATCH]loop cleanup in fs/namespace.c - repost
Oops, my fault. Of course, I tested the patch, but kernel modules are disabled in my test setup, so I missed the error. Thanks for pointing that out, Zach.
Enclosed to this message is a new patch, which replaces the goto-loop by the while-based one, but leaves the EXPORT_SYMBOL macro intact.
Signed-off-by Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
diff --git a/fs/namespace.c b/fs/namespace.c
index 0608388..410e766 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -278,19 +278,17 ...
| Nov 21, 12:54 pm 2007 |
| Dmitri Vorobiev | Nov 21, 4:47 pm 2007 | |
| Dmitri Vorobiev | Nov 21, 3:49 pm 2007 | |
| Andrew Morton | Re: [PATCH] [2.6.24-rc3-mm1] loop cleanup in fs/namespac ...
On Thu, 22 Nov 2007 01:49:19 +0300
[loop-cleanup-fs-namespace-mm.diff text/x-patch (742B)]
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
diff --git a/fs/namespace.c b/fs/namespace.c
index 79883fe..b098b63 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -606,19 +606,17 @@ static inline void __mntput(struct vfsmo
void mntput_no_expire(struct vfsmount *mnt)
{
-repeat:
- if (atomic_dec_and_lock(&mnt->mnt_count, &vfsmount_lock)) {
+ while ...
| Nov 21, 4:24 pm 2007 |
| Dmitri Vorobiev | [PATCH]loop cleanup in fs/namespace.c - repost
Hi list,
Apparently, the following two C language constructs
while (condition) {
// DO HARD WORK
}
and
repeat:
if (condition) {
// DO HARD WORK
goto repeat;
}
are equivalent, but the latter one looks quite cumbersome and is not idiomatic. However, the mntput_no_expire() routine in fs/namespace.c is implemented using the goto-based approach.
The patch given below replaces the goto-loop by a while-based one. Besides, it removes the export for the same routine, because there ...
| Nov 21, 10:57 am 2007 |
| Zach Brown | Re: [PATCH]loop cleanup in fs/namespace.c - repost
It certainly looks OK to me now, for whatever that's worth.
You probably want to wait 'till the next merge window to get it in,
though. It's just a cleanup and so shouldn't go in this late in the -rc
line.
Maybe Andrew will be willing to queue it until that time in -mm.
- z
-
| Nov 21, 1:46 pm 2007 |
| Zach Brown | Re: [PATCH]loop cleanup in fs/namespace.c - repost
That certainly looks fine. I would also replace the 'return' with
This doesn't look fine. Did you test this?
mntput_no_expire() is called from mntput() which is an inline function
in mount.h. So lots of callers of mntput() in modules will end up
trying to call mntput_no_expire() from modules.
$ nm fs/fuse/fuse.ko | grep mntput_no_expire
U mntput_no_expire
- z
-
| Nov 21, 12:06 pm 2007 |
| Christoph Hellwig | Re: [ANN] Squashfs 3.3 released
The normal way to do it is to use shift and mask after doing the endian
conversion. But the problem with bitfields is that they can have different
kinds of layouts depending on the compiler or abi which is another reason
to avoid them in ondisk/wire formats.
-
| Nov 21, 7:48 am 2007 |
| Phillip Lougher | Re: [ANN] Squashfs 3.3 released
Yes, this is mainly my fault. There was a gap of 10 months between the
3.2 release in January this year, and the latest in November. With the
rate of new kernel releases this wasn't really acceptable because the
January release was stuck with a patch for kernels no newer than 2.6.20.
I received numerous complaints about it.
Some of you may be aware that I started work at Canonical, and this left
Squashfs has backwards compatibility with older versions, and it should
mount all older ...
| Nov 21, 7:02 am 2007 |
| Phillip Lougher | Re: [ANN] Squashfs 3.3 released
Yes, the bitfields are packed differently on little and big endian
architectures which mean they appear in different places in the
structure. I want to move away from that mess when I move to little
endian only.
Phillip
-
| Nov 21, 8:00 am 2007 |
| previous day | today | next day |
|---|---|---|
| November 20, 2007 | November 21, 2007 | November 24, 2007 |
