Re: patch for 2.1.61 fat/msdos problems

Gordon Chaffee (chaffee@CS.Berkeley.EDU)
Tue, 4 Nov 1997 12:51:28 -0800 (PST)


Bill Hawes writes:
> (5) for msdos_rmdir, change the test on i_count > 1 to d_count > 1 after
> shrinking child dentries. The shrink is being done with
> shrink_dcache_sb for now, but will change to shrink_dcache_parent when
> it becomes available.

For people have been experiencing problems with the vfat filesystem
in the recent kernels, here is a very small patch that takes care of
the most commonly seen problems. I'm working on another patch that
addresses concerns raised by Bill, but that isn't ready for yet, and
this will fix the worst problem.

- Gordon

--- linux-2.1.62-clean/fs/vfat/namei.c Sun Nov 2 17:24:24 1997
+++ linux/fs/vfat/namei.c Tue Nov 4 13:45:42 1997
@@ -1192,6 +1192,8 @@
struct buffer_head *bh;
struct msdos_dir_entry *de;

+ shrink_dcache_sb(sb); /* should be child prune */
+
if (dir->i_count > 1)
return -EBUSY;
if (MSDOS_I(dir)->i_start) { /* may be zero in mkdir */