diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-01-22 15:40:57 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-01-22 18:04:28 -0500 |
commit | 5955102c9984fa081b2d570cfac75c97eecf8f3b (patch) | |
tree | a4744386eac4b916e847eb4eedfada158f6527b4 /fs/ntfs/super.c | |
parent | 57b8f112cfe6622ddddb8c2641206bb5fa8a112d (diff) |
wrappers for ->i_mutex access
parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested},
inode_foo(inode) being mutex_foo(&inode->i_mutex).
Please, use those for access to ->i_mutex; over the coming cycle
->i_mutex will become rwsem, with ->lookup() done with it held
only shared.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ntfs/super.c')
-rw-r--r-- | fs/ntfs/super.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index 2f77f8dfb861..1b38abdaa3ed 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c | |||
@@ -1284,10 +1284,10 @@ static int check_windows_hibernation_status(ntfs_volume *vol) | |||
1284 | * Find the inode number for the hibernation file by looking up the | 1284 | * Find the inode number for the hibernation file by looking up the |
1285 | * filename hiberfil.sys in the root directory. | 1285 | * filename hiberfil.sys in the root directory. |
1286 | */ | 1286 | */ |
1287 | mutex_lock(&vol->root_ino->i_mutex); | 1287 | inode_lock(vol->root_ino); |
1288 | mref = ntfs_lookup_inode_by_name(NTFS_I(vol->root_ino), hiberfil, 12, | 1288 | mref = ntfs_lookup_inode_by_name(NTFS_I(vol->root_ino), hiberfil, 12, |
1289 | &name); | 1289 | &name); |
1290 | mutex_unlock(&vol->root_ino->i_mutex); | 1290 | inode_unlock(vol->root_ino); |
1291 | if (IS_ERR_MREF(mref)) { | 1291 | if (IS_ERR_MREF(mref)) { |
1292 | ret = MREF_ERR(mref); | 1292 | ret = MREF_ERR(mref); |
1293 | /* If the file does not exist, Windows is not hibernated. */ | 1293 | /* If the file does not exist, Windows is not hibernated. */ |
@@ -1377,10 +1377,10 @@ static bool load_and_init_quota(ntfs_volume *vol) | |||
1377 | * Find the inode number for the quota file by looking up the filename | 1377 | * Find the inode number for the quota file by looking up the filename |
1378 | * $Quota in the extended system files directory $Extend. | 1378 | * $Quota in the extended system files directory $Extend. |
1379 | */ | 1379 | */ |
1380 | mutex_lock(&vol->extend_ino->i_mutex); | 1380 | inode_lock(vol->extend_ino); |
1381 | mref = ntfs_lookup_inode_by_name(NTFS_I(vol->extend_ino), Quota, 6, | 1381 | mref = ntfs_lookup_inode_by_name(NTFS_I(vol->extend_ino), Quota, 6, |
1382 | &name); | 1382 | &name); |
1383 | mutex_unlock(&vol->extend_ino->i_mutex); | 1383 | inode_unlock(vol->extend_ino); |
1384 | if (IS_ERR_MREF(mref)) { | 1384 | if (IS_ERR_MREF(mref)) { |
1385 | /* | 1385 | /* |
1386 | * If the file does not exist, quotas are disabled and have | 1386 | * If the file does not exist, quotas are disabled and have |
@@ -1460,10 +1460,10 @@ static bool load_and_init_usnjrnl(ntfs_volume *vol) | |||
1460 | * Find the inode number for the transaction log file by looking up the | 1460 | * Find the inode number for the transaction log file by looking up the |
1461 | * filename $UsnJrnl in the extended system files directory $Extend. | 1461 | * filename $UsnJrnl in the extended system files directory $Extend. |
1462 | */ | 1462 | */ |
1463 | mutex_lock(&vol->extend_ino->i_mutex); | 1463 | inode_lock(vol->extend_ino); |
1464 | mref = ntfs_lookup_inode_by_name(NTFS_I(vol->extend_ino), UsnJrnl, 8, | 1464 | mref = ntfs_lookup_inode_by_name(NTFS_I(vol->extend_ino), UsnJrnl, 8, |
1465 | &name); | 1465 | &name); |
1466 | mutex_unlock(&vol->extend_ino->i_mutex); | 1466 | inode_unlock(vol->extend_ino); |
1467 | if (IS_ERR_MREF(mref)) { | 1467 | if (IS_ERR_MREF(mref)) { |
1468 | /* | 1468 | /* |
1469 | * If the file does not exist, transaction logging is disabled, | 1469 | * If the file does not exist, transaction logging is disabled, |