A couple trivial fixes and an error path fix
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJVp7R1AAoJEDaohF61QIxkFssQAIIkNbQPOzjrFs5LKhusMBIh 44UWfs2iHevRfakXitUGp/YvKfjQ0JhMC0UN8zwYYTDB3Xm87fxYIVumN44OofG7 pha+tHKj/+d3QK7PQlWdJsfD0/qfH84dreyrMwHCrYGRQxpIWbISm1UhOYQlJeu5 DZDZ5MBizFBXjaFSLHFfoW7gN9fIbEMHXvIUT2PWzsaJpuaB+TZ76VdlNaZpuDFH Ow5gOY3sNqvVMEMWnYYBMTA+tcCw6yqTdmTH3GQqynumESfXw6vdKIyQI9yjPtou nxF0AKU8f4X3RklirZXCwmHYRn0BTVfNOqTCewYmrNFVNqWz+IKeQ/7sqv2kSy3S xBeMbye+f//cGTSEAn/xCZy8VxxhCEgfQJ5HS+lGuuGUCn+xfF/T/n3eM2tLsRYH YGY+Vfk5qw/i5uI6nq2v+j3JRKNYxu9iauZlZ02yr5FuOanvZbydFXOXpQnLZSzh k4HyUJo8E26DseLzF+d5iYpwH9wN6WtQblbet1NyhEvNywnDo57yBT02izeGHi9B ih+qlY3JHiYNZ2/xRcgEaIXNqOm5GO4OR1MD8S2w1sot9cBGb6M8sYyy2IXlr8v+ XLjE+qxsDg/mIWL1vj6nFLzVOOz5O6W4WJ/C4ZDz0VQgoWZrRiYpZs6uovYmYzmN WQL/7C7Ni/lBaQduXrWn =ILFR -----END PGP SIGNATURE----- Merge tag 'jfs-4.2' of git://github.com/kleikamp/linux-shaggy Pull jfs fixes from David Kleikamp: "A couple trivial fixes and an error path fix" * tag 'jfs-4.2' of git://github.com/kleikamp/linux-shaggy: jfs: clean up jfs_rename and fix out of order unlock jfs: fix indentation on if statement jfs: removed a prohibited space after opening parenthesis
This commit is contained in:
commit
f76d94def5
@ -1160,7 +1160,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||||||
rc = dtModify(tid, new_dir, &new_dname, &ino,
|
rc = dtModify(tid, new_dir, &new_dname, &ino,
|
||||||
old_ip->i_ino, JFS_RENAME);
|
old_ip->i_ino, JFS_RENAME);
|
||||||
if (rc)
|
if (rc)
|
||||||
goto out4;
|
goto out_tx;
|
||||||
drop_nlink(new_ip);
|
drop_nlink(new_ip);
|
||||||
if (S_ISDIR(new_ip->i_mode)) {
|
if (S_ISDIR(new_ip->i_mode)) {
|
||||||
drop_nlink(new_ip);
|
drop_nlink(new_ip);
|
||||||
@ -1185,7 +1185,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||||||
if ((new_size = commitZeroLink(tid, new_ip)) < 0) {
|
if ((new_size = commitZeroLink(tid, new_ip)) < 0) {
|
||||||
txAbort(tid, 1); /* Marks FS Dirty */
|
txAbort(tid, 1); /* Marks FS Dirty */
|
||||||
rc = new_size;
|
rc = new_size;
|
||||||
goto out4;
|
goto out_tx;
|
||||||
}
|
}
|
||||||
tblk = tid_to_tblock(tid);
|
tblk = tid_to_tblock(tid);
|
||||||
tblk->xflag |= COMMIT_DELETE;
|
tblk->xflag |= COMMIT_DELETE;
|
||||||
@ -1203,7 +1203,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||||||
if (rc) {
|
if (rc) {
|
||||||
jfs_err("jfs_rename didn't expect dtSearch to fail "
|
jfs_err("jfs_rename didn't expect dtSearch to fail "
|
||||||
"w/rc = %d", rc);
|
"w/rc = %d", rc);
|
||||||
goto out4;
|
goto out_tx;
|
||||||
}
|
}
|
||||||
|
|
||||||
ino = old_ip->i_ino;
|
ino = old_ip->i_ino;
|
||||||
@ -1211,7 +1211,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||||||
if (rc) {
|
if (rc) {
|
||||||
if (rc == -EIO)
|
if (rc == -EIO)
|
||||||
jfs_err("jfs_rename: dtInsert returned -EIO");
|
jfs_err("jfs_rename: dtInsert returned -EIO");
|
||||||
goto out4;
|
goto out_tx;
|
||||||
}
|
}
|
||||||
if (S_ISDIR(old_ip->i_mode))
|
if (S_ISDIR(old_ip->i_mode))
|
||||||
inc_nlink(new_dir);
|
inc_nlink(new_dir);
|
||||||
@ -1226,7 +1226,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||||||
jfs_err("jfs_rename did not expect dtDelete to return rc = %d",
|
jfs_err("jfs_rename did not expect dtDelete to return rc = %d",
|
||||||
rc);
|
rc);
|
||||||
txAbort(tid, 1); /* Marks Filesystem dirty */
|
txAbort(tid, 1); /* Marks Filesystem dirty */
|
||||||
goto out4;
|
goto out_tx;
|
||||||
}
|
}
|
||||||
if (S_ISDIR(old_ip->i_mode)) {
|
if (S_ISDIR(old_ip->i_mode)) {
|
||||||
drop_nlink(old_dir);
|
drop_nlink(old_dir);
|
||||||
@ -1285,7 +1285,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||||||
|
|
||||||
rc = txCommit(tid, ipcount, iplist, commit_flag);
|
rc = txCommit(tid, ipcount, iplist, commit_flag);
|
||||||
|
|
||||||
out4:
|
out_tx:
|
||||||
txEnd(tid);
|
txEnd(tid);
|
||||||
if (new_ip)
|
if (new_ip)
|
||||||
mutex_unlock(&JFS_IP(new_ip)->commit_mutex);
|
mutex_unlock(&JFS_IP(new_ip)->commit_mutex);
|
||||||
@ -1308,13 +1308,6 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||||||
}
|
}
|
||||||
if (new_ip && (new_ip->i_nlink == 0))
|
if (new_ip && (new_ip->i_nlink == 0))
|
||||||
set_cflag(COMMIT_Nolink, new_ip);
|
set_cflag(COMMIT_Nolink, new_ip);
|
||||||
out3:
|
|
||||||
free_UCSname(&new_dname);
|
|
||||||
out2:
|
|
||||||
free_UCSname(&old_dname);
|
|
||||||
out1:
|
|
||||||
if (new_ip && !S_ISDIR(new_ip->i_mode))
|
|
||||||
IWRITE_UNLOCK(new_ip);
|
|
||||||
/*
|
/*
|
||||||
* Truncating the directory index table is not guaranteed. It
|
* Truncating the directory index table is not guaranteed. It
|
||||||
* may need to be done iteratively
|
* may need to be done iteratively
|
||||||
@ -1325,7 +1318,13 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||||||
|
|
||||||
clear_cflag(COMMIT_Stale, old_dir);
|
clear_cflag(COMMIT_Stale, old_dir);
|
||||||
}
|
}
|
||||||
|
if (new_ip && !S_ISDIR(new_ip->i_mode))
|
||||||
|
IWRITE_UNLOCK(new_ip);
|
||||||
|
out3:
|
||||||
|
free_UCSname(&new_dname);
|
||||||
|
out2:
|
||||||
|
free_UCSname(&old_dname);
|
||||||
|
out1:
|
||||||
jfs_info("jfs_rename: returning %d", rc);
|
jfs_info("jfs_rename: returning %d", rc);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user