~ubuntu-branches/ubuntu/precise/openafs/precise-proposed

« back to all changes in this revision

Viewing changes to src/vol/vutil.c

  • Committer: Package Import Robot
  • Author(s): Russ Allbery
  • Date: 2012-03-28 17:25:05 UTC
  • mfrom: (28.2.13 sid)
  • Revision ID: package-import@ubuntu.com-20120328172505-y9iycrlfhtfsn7mv
Tags: 1.6.1-1
* New upstream release.
  - Do not ignore all InlineBulkStatus errors in file server.
  - Support for Linux 3.3 and 3.4.
  - Fix incorrect kernel error handling in afs_notify_change.
  - Fix locking around RXS_PreparePacket.

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
 
92
92
#ifdef FSSYNC_BUILD_CLIENT
93
93
static void
94
 
RemoveInodes(Device dev, VolumeId vid)
 
94
RemoveInodes(Device dev, VolumeId parent, VolumeId vid)
95
95
{
96
96
    int i;
97
97
    IHandle_t *handle;
99
99
    /* This relies on the fact that IDEC only needs the device and NT only
100
100
     * needs the dev and vid to decrement volume special files.
101
101
     */
102
 
    IH_INIT(handle, dev, vid, -1);
 
102
    IH_INIT(handle, dev, parent, -1);
103
103
    for (i = 0; i < nFILES; i++) {
104
104
        Inode inode = *stuff[i].inode;
105
 
        if (VALID_INO(inode))
106
 
            IH_DEC(handle, inode, vid);
 
105
        if (VALID_INO(inode)) {
 
106
            if (stuff[i].inodeType == VI_LINKTABLE) {
 
107
                IH_DEC(handle, inode, parent);
 
108
            } else {
 
109
                IH_DEC(handle, inode, vid);
 
110
            }
 
111
        }
107
112
    }
108
113
    IH_RELEASE(handle);
109
114
}
256
261
          bad:
257
262
            if (handle)
258
263
                IH_RELEASE(handle);
259
 
            RemoveInodes(device, vol.id);
 
264
            RemoveInodes(device, vol.parentId, vol.id);
260
265
            if (!*ec) {
261
266
                *ec = VNOVOL;
262
267
            }