Re: OOPS kernel2.5.17 in vatfs?

OGAWA Hirofumi (hirofumi@mail.parknet.co.jp)
Wed, 22 May 2002 00:00:47 +0900


Rene Blokland <reneb@orac.aais.org> writes:

> Hi all When installing vmlinuz op a fat partinion i get a nice :-/ oops
> If you need more information please tell me.
> Thanks Rene

Probably, the following patch fixes this. NOTE, however I haven't even
compiled this yet.

--- linux-cvs/fs/vfat/namei.c.orig Tue May 21 21:59:42 2002
+++ linux-cvs/fs/vfat/namei.c Tue May 21 21:58:25 2002
@@ -1020,16 +1020,12 @@
unlock_kernel();
dentry->d_op = &vfat_dentry_ops[table];
dentry->d_time = dentry->d_parent->d_inode->i_version;
- if (inode) {
- dentry = d_splice_alias(inode, dentry);
- if (dentry) {
- dentry->d_op = &vfat_dentry_ops[table];
- dentry->d_time = dentry->d_parent->d_inode->i_version;
- }
- return dentry;
+ dentry = d_splice_alias(inode, dentry);
+ if (dentry) {
+ dentry->d_op = &vfat_dentry_ops[table];
+ dentry->d_time = dentry->d_parent->d_inode->i_version;
}
- d_add(dentry,inode);
- return NULL;
+ return dentry;
}

int vfat_create(struct inode *dir,struct dentry* dentry,int mode)
--- linux-cvs/fs/msdos/namei.c.orig Tue May 21 22:02:08 2002
+++ linux-cvs/fs/msdos/namei.c Tue May 21 22:01:46 2002
@@ -221,22 +221,17 @@
if (res)
goto out;
add:
- if (inode) {
- dentry = d_splice_alias(inode, dentry);
- dentry->d_op = &msdos_dentry_operations;
- } else {
- d_add(dentry, inode);
- dentry = NULL;
- }
res = 0;
+ dentry = d_splice_alias(inode, dentry);
+ if (dentry)
+ dentry->d_op = &msdos_dentry_operations;
out:
if (bh)
fat_brelse(sb, bh);
unlock_kernel();
- if (res)
- return ERR_PTR(res);
- else
+ if (!res)
return dentry;
+ return ERR_PTR(res);
}

/***** Creates a directory entry (name is already formatted). */

-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/