git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
fs
/
jfs
/
namei.c
diff --git
a/fs/jfs/namei.c
b/fs/jfs/namei.c
index
2d7f32a
..
a32f2f5
100644
(file)
--- a/
fs/jfs/namei.c
+++ b/
fs/jfs/namei.c
@@
-105,8
+105,8
@@
static int jfs_create(struct inode *dip, struct dentry *dentry, int mode,
tid = txBegin(dip->i_sb, 0);
tid = txBegin(dip->i_sb, 0);
-
mutex_lock(&JFS_IP(dip)->commit_mutex
);
-
mutex_lock(&JFS_IP(ip)->commit_mutex
);
+
down(&JFS_IP(dip)->commit_sem
);
+
down(&JFS_IP(ip)->commit_sem
);
rc = jfs_init_acl(tid, ip, dip);
if (rc)
rc = jfs_init_acl(tid, ip, dip);
if (rc)
@@
-166,8
+166,8
@@
static int jfs_create(struct inode *dip, struct dentry *dentry, int mode,
out3:
txEnd(tid);
out3:
txEnd(tid);
-
mutex_unlock(&JFS_IP(dip)->commit_mutex
);
-
mutex_unlock(&JFS_IP(ip)->commit_mutex
);
+
up(&JFS_IP(dip)->commit_sem
);
+
up(&JFS_IP(ip)->commit_sem
);
if (rc) {
free_ea_wmap(ip);
ip->i_nlink = 0;
if (rc) {
free_ea_wmap(ip);
ip->i_nlink = 0;
@@
-239,8
+239,8
@@
static int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode)
tid = txBegin(dip->i_sb, 0);
tid = txBegin(dip->i_sb, 0);
-
mutex_lock(&JFS_IP(dip)->commit_mutex
);
-
mutex_lock(&JFS_IP(ip)->commit_mutex
);
+
down(&JFS_IP(dip)->commit_sem
);
+
down(&JFS_IP(ip)->commit_sem
);
rc = jfs_init_acl(tid, ip, dip);
if (rc)
rc = jfs_init_acl(tid, ip, dip);
if (rc)
@@
-301,8
+301,8
@@
static int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode)
out3:
txEnd(tid);
out3:
txEnd(tid);
-
mutex_unlock(&JFS_IP(dip)->commit_mutex
);
-
mutex_unlock(&JFS_IP(ip)->commit_mutex
);
+
up(&JFS_IP(dip)->commit_sem
);
+
up(&JFS_IP(ip)->commit_sem
);
if (rc) {
free_ea_wmap(ip);
ip->i_nlink = 0;
if (rc) {
free_ea_wmap(ip);
ip->i_nlink = 0;
@@
-366,8
+366,8
@@
static int jfs_rmdir(struct inode *dip, struct dentry *dentry)
tid = txBegin(dip->i_sb, 0);
tid = txBegin(dip->i_sb, 0);
-
mutex_lock(&JFS_IP(dip)->commit_mutex
);
-
mutex_lock(&JFS_IP(ip)->commit_mutex
);
+
down(&JFS_IP(dip)->commit_sem
);
+
down(&JFS_IP(ip)->commit_sem
);
iplist[0] = dip;
iplist[1] = ip;
iplist[0] = dip;
iplist[1] = ip;
@@
-385,8
+385,8
@@
static int jfs_rmdir(struct inode *dip, struct dentry *dentry)
if (rc == -EIO)
txAbort(tid, 1);
txEnd(tid);
if (rc == -EIO)
txAbort(tid, 1);
txEnd(tid);
-
mutex_unlock(&JFS_IP(dip)->commit_mutex
);
-
mutex_unlock(&JFS_IP(ip)->commit_mutex
);
+
up(&JFS_IP(dip)->commit_sem
);
+
up(&JFS_IP(ip)->commit_sem
);
goto out2;
}
goto out2;
}
@@
-423,8
+423,8
@@
static int jfs_rmdir(struct inode *dip, struct dentry *dentry)
txEnd(tid);
txEnd(tid);
-
mutex_unlock(&JFS_IP(dip)->commit_mutex
);
-
mutex_unlock(&JFS_IP(ip)->commit_mutex
);
+
up(&JFS_IP(dip)->commit_sem
);
+
up(&JFS_IP(ip)->commit_sem
);
/*
* Truncating the directory index table is not guaranteed. It
/*
* Truncating the directory index table is not guaranteed. It
@@
-489,8
+489,8
@@
static int jfs_unlink(struct inode *dip, struct dentry *dentry)
tid = txBegin(dip->i_sb, 0);
tid = txBegin(dip->i_sb, 0);
-
mutex_lock(&JFS_IP(dip)->commit_mutex
);
-
mutex_lock(&JFS_IP(ip)->commit_mutex
);
+
down(&JFS_IP(dip)->commit_sem
);
+
down(&JFS_IP(ip)->commit_sem
);
iplist[0] = dip;
iplist[1] = ip;
iplist[0] = dip;
iplist[1] = ip;
@@
-504,8
+504,8
@@
static int jfs_unlink(struct inode *dip, struct dentry *dentry)
if (rc == -EIO)
txAbort(tid, 1); /* Marks FS Dirty */
txEnd(tid);
if (rc == -EIO)
txAbort(tid, 1); /* Marks FS Dirty */
txEnd(tid);
-
mutex_unlock(&JFS_IP(dip)->commit_mutex
);
-
mutex_unlock(&JFS_IP(ip)->commit_mutex
);
+
up(&JFS_IP(dip)->commit_sem
);
+
up(&JFS_IP(ip)->commit_sem
);
IWRITE_UNLOCK(ip);
goto out1;
}
IWRITE_UNLOCK(ip);
goto out1;
}
@@
-528,8
+528,8
@@
static int jfs_unlink(struct inode *dip, struct dentry *dentry)
if ((new_size = commitZeroLink(tid, ip)) < 0) {
txAbort(tid, 1); /* Marks FS Dirty */
txEnd(tid);
if ((new_size = commitZeroLink(tid, ip)) < 0) {
txAbort(tid, 1); /* Marks FS Dirty */
txEnd(tid);
-
mutex_unlock(&JFS_IP(dip)->commit_mutex
);
-
mutex_unlock(&JFS_IP(ip)->commit_mutex
);
+
up(&JFS_IP(dip)->commit_sem
);
+
up(&JFS_IP(ip)->commit_sem
);
IWRITE_UNLOCK(ip);
rc = new_size;
goto out1;
IWRITE_UNLOCK(ip);
rc = new_size;
goto out1;
@@
-557,13
+557,13
@@
static int jfs_unlink(struct inode *dip, struct dentry *dentry)
txEnd(tid);
txEnd(tid);
-
mutex_unlock(&JFS_IP(dip)->commit_mutex
);
-
mutex_unlock(&JFS_IP(ip)->commit_mutex
);
+
up(&JFS_IP(dip)->commit_sem
);
+
up(&JFS_IP(ip)->commit_sem
);
while (new_size && (rc == 0)) {
tid = txBegin(dip->i_sb, 0);
while (new_size && (rc == 0)) {
tid = txBegin(dip->i_sb, 0);
-
mutex_lock(&JFS_IP(ip)->commit_mutex
);
+
down(&JFS_IP(ip)->commit_sem
);
new_size = xtTruncate_pmap(tid, ip, new_size);
if (new_size < 0) {
txAbort(tid, 1); /* Marks FS Dirty */
new_size = xtTruncate_pmap(tid, ip, new_size);
if (new_size < 0) {
txAbort(tid, 1); /* Marks FS Dirty */
@@
-571,7
+571,7
@@
static int jfs_unlink(struct inode *dip, struct dentry *dentry)
} else
rc = txCommit(tid, 2, &iplist[0], COMMIT_SYNC);
txEnd(tid);
} else
rc = txCommit(tid, 2, &iplist[0], COMMIT_SYNC);
txEnd(tid);
-
mutex_unlock(&JFS_IP(ip)->commit_mutex
);
+
up(&JFS_IP(ip)->commit_sem
);
}
if (ip->i_nlink == 0)
}
if (ip->i_nlink == 0)
@@
-806,8
+806,8
@@
static int jfs_link(struct dentry *old_dentry,
tid = txBegin(ip->i_sb, 0);
tid = txBegin(ip->i_sb, 0);
-
mutex_lock(&JFS_IP(dir)->commit_mutex
);
-
mutex_lock(&JFS_IP(ip)->commit_mutex
);
+
down(&JFS_IP(dir)->commit_sem
);
+
down(&JFS_IP(ip)->commit_sem
);
/*
* scan parent directory for entry/freespace
/*
* scan parent directory for entry/freespace
@@
-848,8
+848,8
@@
static int jfs_link(struct dentry *old_dentry,
out:
txEnd(tid);
out:
txEnd(tid);
-
mutex_unlock(&JFS_IP(dir)->commit_mutex
);
-
mutex_unlock(&JFS_IP(ip)->commit_mutex
);
+
up(&JFS_IP(dir)->commit_sem
);
+
up(&JFS_IP(ip)->commit_sem
);
jfs_info("jfs_link: rc:%d", rc);
return rc;
jfs_info("jfs_link: rc:%d", rc);
return rc;
@@
-917,8
+917,8
@@
static int jfs_symlink(struct inode *dip, struct dentry *dentry,
tid = txBegin(dip->i_sb, 0);
tid = txBegin(dip->i_sb, 0);
-
mutex_lock(&JFS_IP(dip)->commit_mutex
);
-
mutex_lock(&JFS_IP(ip)->commit_mutex
);
+
down(&JFS_IP(dip)->commit_sem
);
+
down(&JFS_IP(ip)->commit_sem
);
rc = jfs_init_security(tid, ip, dip);
if (rc)
rc = jfs_init_security(tid, ip, dip);
if (rc)
@@
-1038,8
+1038,8
@@
static int jfs_symlink(struct inode *dip, struct dentry *dentry,
out3:
txEnd(tid);
out3:
txEnd(tid);
-
mutex_unlock(&JFS_IP(dip)->commit_mutex
);
-
mutex_unlock(&JFS_IP(ip)->commit_mutex
);
+
up(&JFS_IP(dip)->commit_sem
);
+
up(&JFS_IP(ip)->commit_sem
);
if (rc) {
free_ea_wmap(ip);
ip->i_nlink = 0;
if (rc) {
free_ea_wmap(ip);
ip->i_nlink = 0;
@@
-1142,13
+1142,13
@@
static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
*/
tid = txBegin(new_dir->i_sb, 0);
*/
tid = txBegin(new_dir->i_sb, 0);
-
mutex_lock(&JFS_IP(new_dir)->commit_mutex
);
-
mutex_lock(&JFS_IP(old_ip)->commit_mutex
);
+
down(&JFS_IP(new_dir)->commit_sem
);
+
down(&JFS_IP(old_ip)->commit_sem
);
if (old_dir != new_dir)
if (old_dir != new_dir)
-
mutex_lock(&JFS_IP(old_dir)->commit_mutex
);
+
down(&JFS_IP(old_dir)->commit_sem
);
if (new_ip) {
if (new_ip) {
-
mutex_lock(&JFS_IP(new_ip)->commit_mutex
);
+
down(&JFS_IP(new_ip)->commit_sem
);
/*
* Change existing directory entry to new inode number
*/
/*
* Change existing directory entry to new inode number
*/
@@
-1161,10
+1161,10
@@
static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
if (S_ISDIR(new_ip->i_mode)) {
new_ip->i_nlink--;
if (new_ip->i_nlink) {
if (S_ISDIR(new_ip->i_mode)) {
new_ip->i_nlink--;
if (new_ip->i_nlink) {
-
mutex_unlock(&JFS_IP(new_dir)->commit_mutex
);
-
mutex_unlock(&JFS_IP(old_ip)->commit_mutex
);
+
up(&JFS_IP(new_dir)->commit_sem
);
+
up(&JFS_IP(old_ip)->commit_sem
);
if (old_dir != new_dir)
if (old_dir != new_dir)
-
mutex_unlock(&JFS_IP(old_dir)->commit_mutex
);
+
up(&JFS_IP(old_dir)->commit_sem
);
if (!S_ISDIR(old_ip->i_mode) && new_ip)
IWRITE_UNLOCK(new_ip);
jfs_error(new_ip->i_sb,
if (!S_ISDIR(old_ip->i_mode) && new_ip)
IWRITE_UNLOCK(new_ip);
jfs_error(new_ip->i_sb,
@@
-1283,16
+1283,16
@@
static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
out4:
txEnd(tid);
out4:
txEnd(tid);
-
mutex_unlock(&JFS_IP(new_dir)->commit_mutex
);
-
mutex_unlock(&JFS_IP(old_ip)->commit_mutex
);
+
up(&JFS_IP(new_dir)->commit_sem
);
+
up(&JFS_IP(old_ip)->commit_sem
);
if (old_dir != new_dir)
if (old_dir != new_dir)
-
mutex_unlock(&JFS_IP(old_dir)->commit_mutex
);
+
up(&JFS_IP(old_dir)->commit_sem
);
if (new_ip)
if (new_ip)
-
mutex_unlock(&JFS_IP(new_ip)->commit_mutex
);
+
up(&JFS_IP(new_ip)->commit_sem
);
while (new_size && (rc == 0)) {
tid = txBegin(new_ip->i_sb, 0);
while (new_size && (rc == 0)) {
tid = txBegin(new_ip->i_sb, 0);
-
mutex_lock(&JFS_IP(new_ip)->commit_mutex
);
+
down(&JFS_IP(new_ip)->commit_sem
);
new_size = xtTruncate_pmap(tid, new_ip, new_size);
if (new_size < 0) {
txAbort(tid, 1);
new_size = xtTruncate_pmap(tid, new_ip, new_size);
if (new_size < 0) {
txAbort(tid, 1);
@@
-1300,7
+1300,7
@@
static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
} else
rc = txCommit(tid, 1, &new_ip, COMMIT_SYNC);
txEnd(tid);
} else
rc = txCommit(tid, 1, &new_ip, COMMIT_SYNC);
txEnd(tid);
-
mutex_unlock(&JFS_IP(new_ip)->commit_mutex
);
+
up(&JFS_IP(new_ip)->commit_sem
);
}
if (new_ip && (new_ip->i_nlink == 0))
set_cflag(COMMIT_Nolink, new_ip);
}
if (new_ip && (new_ip->i_nlink == 0))
set_cflag(COMMIT_Nolink, new_ip);
@@
-1362,8
+1362,8
@@
static int jfs_mknod(struct inode *dir, struct dentry *dentry,
tid = txBegin(dir->i_sb, 0);
tid = txBegin(dir->i_sb, 0);
-
mutex_lock(&JFS_IP(dir)->commit_mutex
);
-
mutex_lock(&JFS_IP(ip)->commit_mutex
);
+
down(&JFS_IP(dir)->commit_sem
);
+
down(&JFS_IP(ip)->commit_sem
);
rc = jfs_init_acl(tid, ip, dir);
if (rc)
rc = jfs_init_acl(tid, ip, dir);
if (rc)
@@
-1408,8
+1408,8
@@
static int jfs_mknod(struct inode *dir, struct dentry *dentry,
out3:
txEnd(tid);
out3:
txEnd(tid);
-
mutex_unlock(&JFS_IP(ip)->commit_mutex
);
-
mutex_unlock(&JFS_IP(dir)->commit_mutex
);
+
up(&JFS_IP(ip)->commit_sem
);
+
up(&JFS_IP(dir)->commit_sem
);
if (rc) {
free_ea_wmap(ip);
ip->i_nlink = 0;
if (rc) {
free_ea_wmap(ip);
ip->i_nlink = 0;
@@
-1519,14
+1519,12
@@
struct inode_operations jfs_dir_inode_operations = {
.setattr = jfs_setattr,
.permission = jfs_permission,
#endif
.setattr = jfs_setattr,
.permission = jfs_permission,
#endif
- .sync_flags = jfs_sync_flags,
};
};
-
const
struct file_operations jfs_dir_operations = {
+struct file_operations jfs_dir_operations = {
.read = generic_read_dir,
.readdir = jfs_readdir,
.fsync = jfs_fsync,
.read = generic_read_dir,
.readdir = jfs_readdir,
.fsync = jfs_fsync,
- .ioctl = jfs_ioctl,
};
static int jfs_ci_hash(struct dentry *dir, struct qstr *this)
};
static int jfs_ci_hash(struct dentry *dir, struct qstr *this)