From 1b1dcc1b57a49136f118a0f16367256ff9994a69 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Mon, 9 Jan 2006 15:59:24 -0800 Subject: [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem This patch converts the inode semaphore to a mutex. I have tested it on XFS and compiled as much as one can consider on an ia64. Anyway your luck with it might be different. Modified-by: Ingo Molnar (finished the conversion) Signed-off-by: Jes Sorensen Signed-off-by: Ingo Molnar --- fs/nfsd/vfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'fs/nfsd/vfs.c') diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index df4019f0456..bb36b430449 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -390,12 +390,12 @@ set_nfsv4_acl_one(struct dentry *dentry, struct posix_acl *pacl, char *key) error = -EOPNOTSUPP; if (inode->i_op && inode->i_op->setxattr) { - down(&inode->i_sem); + mutex_lock(&inode->i_mutex); security_inode_setxattr(dentry, key, buf, len, 0); error = inode->i_op->setxattr(dentry, key, buf, len, 0); if (!error) security_inode_post_setxattr(dentry, key, buf, len, 0); - up(&inode->i_sem); + mutex_unlock(&inode->i_mutex); } out: kfree(buf); @@ -739,9 +739,9 @@ nfsd_sync(struct file *filp) int err; struct inode *inode = filp->f_dentry->d_inode; dprintk("nfsd: sync file %s\n", filp->f_dentry->d_name.name); - down(&inode->i_sem); + mutex_lock(&inode->i_mutex); err=nfsd_dosync(filp, filp->f_dentry, filp->f_op); - up(&inode->i_sem); + mutex_unlock(&inode->i_mutex); return err; } @@ -885,9 +885,9 @@ static void kill_suid(struct dentry *dentry) struct iattr ia; ia.ia_valid = ATTR_KILL_SUID | ATTR_KILL_SGID; - down(&dentry->d_inode->i_sem); + mutex_lock(&dentry->d_inode->i_mutex); notify_change(dentry, &ia); - up(&dentry->d_inode->i_sem); + mutex_unlock(&dentry->d_inode->i_mutex); } static inline int -- cgit v1.2.3-70-g09d2