sys/vfs/tmpfs: Make flag handling consistent [2/2]
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Fri, 8 May 2015 11:33:07 +0000 (20:33 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Fri, 8 May 2015 19:00:38 +0000 (04:00 +0900)
- Remove unnecessary unlock/lock after the previous commit.

sys/vfs/tmpfs/tmpfs_vnops.c

index 7e5a5b8..5c6e922 100644 (file)
@@ -108,9 +108,7 @@ tmpfs_nresolve(struct vop_nresolve_args *v)
                if (error == 0)
                        KKASSERT(vp);
        }
-       TMPFS_NODE_UNLOCK(dnode);
 
-       TMPFS_NODE_LOCK(dnode);
        dnode->tn_status |= TMPFS_NODE_ACCESSED;
        TMPFS_NODE_UNLOCK(dnode);
 
@@ -1515,9 +1513,7 @@ outok:
                }
                KKASSERT(uio->uio_offset == off);
        }
-       TMPFS_NODE_UNLOCK(node);
 
-       TMPFS_NODE_LOCK(node);
        node->tn_status |= TMPFS_NODE_ACCESSED;
        TMPFS_NODE_UNLOCK(node);
        return error;
@@ -1540,8 +1536,6 @@ tmpfs_readlink(struct vop_readlink_args *v)
        TMPFS_NODE_LOCK_SH(node);
        error = uiomove(node->tn_link,
                        MIN(node->tn_size, uio->uio_resid), uio);
-       TMPFS_NODE_UNLOCK(node);
-       TMPFS_NODE_LOCK(node);
        node->tn_status |= TMPFS_NODE_ACCESSED;
        TMPFS_NODE_UNLOCK(node);
        return error;