Messages in this thread |  | | | Date | Thu, 3 Aug 2006 15:35:49 +0100 | | From | Christoph Hellwig <> | | Subject | Re: [PATCH 03/28] unlink: monitor i_nlink |
| |
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 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/
|  |