aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_utils.c')
-rw-r--r--fs/xfs/xfs_utils.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/xfs/xfs_utils.c b/fs/xfs/xfs_utils.c
index 673b405eaa3..45d740df53b 100644
--- a/fs/xfs/xfs_utils.c
+++ b/fs/xfs/xfs_utils.c
@@ -73,7 +73,7 @@ xfs_dir_lookup_int(
73{ 73{
74 int error; 74 int error;
75 75
76 vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); 76 xfs_itrace_entry(dp);
77 77
78 error = xfs_dir_lookup(NULL, dp, VNAME(dentry), VNAMELEN(dentry), inum); 78 error = xfs_dir_lookup(NULL, dp, VNAME(dentry), VNAMELEN(dentry), inum);
79 if (!error) { 79 if (!error) {
@@ -302,6 +302,7 @@ xfs_droplink(
302 302
303 ASSERT (ip->i_d.di_nlink > 0); 303 ASSERT (ip->i_d.di_nlink > 0);
304 ip->i_d.di_nlink--; 304 ip->i_d.di_nlink--;
305 drop_nlink(ip->i_vnode);
305 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); 306 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
306 307
307 error = 0; 308 error = 0;
@@ -330,7 +331,6 @@ xfs_bump_ino_vers2(
330 xfs_inode_t *ip) 331 xfs_inode_t *ip)
331{ 332{
332 xfs_mount_t *mp; 333 xfs_mount_t *mp;
333 unsigned long s;
334 334
335 ASSERT(ismrlocked (&ip->i_lock, MR_UPDATE)); 335 ASSERT(ismrlocked (&ip->i_lock, MR_UPDATE));
336 ASSERT(ip->i_d.di_version == XFS_DINODE_VERSION_1); 336 ASSERT(ip->i_d.di_version == XFS_DINODE_VERSION_1);
@@ -340,13 +340,13 @@ xfs_bump_ino_vers2(
340 memset(&(ip->i_d.di_pad[0]), 0, sizeof(ip->i_d.di_pad)); 340 memset(&(ip->i_d.di_pad[0]), 0, sizeof(ip->i_d.di_pad));
341 mp = tp->t_mountp; 341 mp = tp->t_mountp;
342 if (!XFS_SB_VERSION_HASNLINK(&mp->m_sb)) { 342 if (!XFS_SB_VERSION_HASNLINK(&mp->m_sb)) {
343 s = XFS_SB_LOCK(mp); 343 spin_lock(&mp->m_sb_lock);
344 if (!XFS_SB_VERSION_HASNLINK(&mp->m_sb)) { 344 if (!XFS_SB_VERSION_HASNLINK(&mp->m_sb)) {
345 XFS_SB_VERSION_ADDNLINK(&mp->m_sb); 345 XFS_SB_VERSION_ADDNLINK(&mp->m_sb);
346 XFS_SB_UNLOCK(mp, s); 346 spin_unlock(&mp->m_sb_lock);
347 xfs_mod_sb(tp, XFS_SB_VERSIONNUM); 347 xfs_mod_sb(tp, XFS_SB_VERSIONNUM);
348 } else { 348 } else {
349 XFS_SB_UNLOCK(mp, s); 349 spin_unlock(&mp->m_sb_lock);
350 } 350 }
351 } 351 }
352 /* Caller must log the inode */ 352 /* Caller must log the inode */
@@ -366,6 +366,7 @@ xfs_bumplink(
366 366
367 ASSERT(ip->i_d.di_nlink > 0); 367 ASSERT(ip->i_d.di_nlink > 0);
368 ip->i_d.di_nlink++; 368 ip->i_d.di_nlink++;
369 inc_nlink(ip->i_vnode);
369 if ((ip->i_d.di_version == XFS_DINODE_VERSION_1) && 370 if ((ip->i_d.di_version == XFS_DINODE_VERSION_1) &&
370 (ip->i_d.di_nlink > XFS_MAXLINK_1)) { 371 (ip->i_d.di_nlink > XFS_MAXLINK_1)) {
371 /* 372 /*