tmpfs_patch.diff
| b/sys/vfs/tmpfs/tmpfs_vfsops.c | ||
|---|---|---|
| 500 | 500 |
return 0; |
| 501 | 501 |
} |
| 502 | 502 | |
| 503 |
/* --------------------------------------------------------------------- */ |
|
| 504 | ||
| 505 |
static int |
|
| 506 |
tmpfs_vptofh(struct vnode *vp, struct fid *fhp) |
|
| 507 |
{
|
|
| 508 |
struct tmpfs_node *node; |
|
| 509 |
struct tmpfs_fid tfh; |
|
| 510 |
node = VP_TO_TMPFS_NODE(vp); |
|
| 511 |
memset(&tfh, 0, sizeof(tfh)); |
|
| 512 |
tfh.tf_len = sizeof(struct tmpfs_fid); |
|
| 513 |
tfh.tf_gen = node->tn_gen; |
|
| 514 |
tfh.tf_id = node->tn_id; |
|
| 515 |
memcpy(fhp, &tfh, sizeof(tfh)); |
|
| 516 |
return (0); |
|
| 517 |
} |
|
| 518 | ||
| 503 | 519 |
/* --------------------------------------------------------------------- */ |
| 504 | 520 | |
| 505 | 521 |
/* |
| ... | ... | |
| 512 | 528 |
.vfs_root = tmpfs_root, |
| 513 | 529 |
.vfs_statfs = tmpfs_statfs, |
| 514 | 530 |
.vfs_fhtovp = tmpfs_fhtovp, |
| 531 |
.vfs_vptofh = tmpfs_vptofh, |
|
| 515 | 532 |
.vfs_sync = vfs_stdsync |
| 516 | 533 |
}; |
| 517 | 534 | |