Re: [PATCH 03/28] unlink: monitor i_nlink

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

 



On Tue, Aug 01, 2006 at 04:52:42PM -0700, Dave Hansen wrote:
> 
> When a filesystem decrements i_nlink to zero, it means that a
> write must be performed in order to drop the inode from the
> filesystem.
> 
> We're shortly going to have keep filesystems from being remounted
> r/o between the time that this i_nlink decrement and that write
> occurs.  
> 
> So, add a little helper function to do the decrements.  We'll
> tie into it in a bit to note when i_nlink hits zero.

Looks good.  I wonder if we could find a better name for it.  Maybe just
dec_nlink?  And add a simple counterpart

static inline void inc_nlink(struct inode *inode)
{
	inode->i_nlink++;
}

for symmetry reasons.  After that the patch can go off to Andrew before
the series aswell.

> Should
> we also be checking all of the places where i_nlink is explicitly
> set to 0 in the unlink paths?

They'll definitly need some auditing.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux