Messages in this thread | | | Date | Fri, 18 Jan 2002 12:38:07 +0100 (CET) | From | Roman Zippel <> | Subject | Re: attr.c::notify_change() -- locking_change |
| |
Hi,
On Thu, 17 Jan 2002, Craig Christophel wrote:
> + spin_lock(&inode_lock); > + if(inode->i_state & I_ATTR_LOCK) { > + spin_unlock(&inode_lock); > + } > + else { > + inode->i_state =| I_ATTR_LOCK; > + tflag = 1; > + spin_unlock(&inode_lock); > + }
There are other write accesses to i_state, so you either have to protect them all with this lock or you could convert all accesses to use bitfield instructions.
> +static inline void wait_on_inode(struct inode *inode, int flag);
Instead of the flag two separate functions wait_on_inode_lock, wait_on_inode_attr_lock are IMO more readable and cleaner.
bye, Roman
- 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/
| |