本文整理汇总了C++中print_entry_location函数的典型用法代码示例。如果您正苦于以下问题:C++ print_entry_location函数的具体用法?C++ print_entry_location怎么用?C++ print_entry_location使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_entry_location函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: base0fs_mknod
STATIC int
base0fs_mknod(inode_t *dir, struct dentry *dentry, int mode, dev_t dev)
{
int err;
struct dentry *lower_dentry;
struct dentry *lower_dir_dentry;
print_entry_location();
lower_dentry = base0fs_lower_dentry(dentry); /* CPW: Moved below print_entry_location */
fist_checkinode(dir, "base0fs_mknod-dir");
lower_dir_dentry = base0fs_lock_parent(lower_dentry);
err = VFS_MKNOD(lower_dir_dentry->d_inode,
lower_dentry,
mode,
dev);
if (err || !lower_dentry->d_inode)
goto out;
err = base0fs_interpose(lower_dentry, dentry, dir->i_sb, 0);
if (err)
goto out;
fist_copy_attr_timesizes(dir, lower_dir_dentry->d_inode);
out:
unlock_dir(lower_dir_dentry);
if (!dentry->d_inode)
d_drop(dentry);
fist_checkinode(dir, "post base0fs_mknod-dir");
print_exit_status(err);
return err;
}
示例2: base0fs_readlink
STATIC int
base0fs_readlink(struct dentry *dentry, char *buf, int bufsiz)
{
int err;
struct dentry *lower_dentry;
print_entry_location();
lower_dentry = base0fs_lower_dentry(dentry);/* CPW: Moved below print_entry_location */
fist_print_dentry("base0fs_readlink IN", dentry);
if (!lower_dentry->d_inode->i_op ||
!lower_dentry->d_inode->i_op->readlink) {
err = -EINVAL;
goto out;
}
err = lower_dentry->d_inode->i_op->readlink(lower_dentry,
buf,
bufsiz);
if (err > 0)
fist_copy_attr_atime(dentry->d_inode, lower_dentry->d_inode);
out:
print_exit_status(err);
return err;
}
示例3: unionfs_put_super
/* final actions when unmounting a file system */
static void unionfs_put_super(struct super_block *sb)
{
int bindex, bstart, bend;
struct unionfs_sb_info *spd;
print_entry_location();
if ((spd = stopd(sb))) {
/* XXX: Free persistent inode stuff. */
bstart = sbstart(sb);
bend = sbend(sb);
for (bindex = bstart; bindex <= bend; bindex++)
mntput(stohiddenmnt_index(sb, bindex));
/* Make sure we have no leaks of branchget/branchput. */
for (bindex = bstart; bindex <= bend; bindex++)
ASSERT(branch_count(sb, bindex) == 0);
KFREE(stohs_ptr(sb));
KFREE(stohiddenmnt_ptr(sb));
KFREE(spd->usi_sbcount_p);
KFREE(spd->usi_branchperms_p);
KFREE(spd->usi_putmaps);
KFREE(spd);
stopd_lhs(sb) = NULL;
}
fist_dprint(6, "unionfs: released super\n");
print_exit_location();
}
示例4: base0fs_removexattr
/*
* BKL held by caller.
* dentry->d_inode->i_{sem,mutex} down
*/
STATIC int
base0fs_removexattr(struct dentry *dentry, const char *name)
{
struct dentry *lower_dentry = NULL;
int err = -ENOTSUPP;
char *encoded_name;
print_entry_location();
lower_dentry = DENTRY_TO_LOWER(dentry);
BUG_ON(!lower_dentry);
BUG_ON(!lower_dentry->d_inode);
BUG_ON(!lower_dentry->d_inode->i_op);
fist_dprint(18, "removexattr: name=\"%s\"\n", name);
if (lower_dentry->d_inode->i_op->removexattr) {
encoded_name = (char *)name;
lock_inode(lower_dentry->d_inode);
/* lock_kernel() already done by caller. */
err = lower_dentry->d_inode->i_op->removexattr(lower_dentry, encoded_name);
/* unlock_kernel() will be done by caller. */
unlock_inode(lower_dentry->d_inode);
}
out:
print_exit_status(err);
return err;
}
示例5: base0fs_listxattr
/*
* BKL held by caller.
* dentry->d_inode->i_{sem,mutex} down
*/
STATIC ssize_t
base0fs_listxattr(struct dentry *dentry, char *list, size_t size)
{
struct dentry *lower_dentry = NULL;
int err = -ENOTSUPP;
char *encoded_list = NULL;
print_entry_location();
lower_dentry = DENTRY_TO_LOWER(dentry);
BUG_ON(!lower_dentry);
BUG_ON(!lower_dentry->d_inode);
BUG_ON(!lower_dentry->d_inode->i_op);
if (lower_dentry->d_inode->i_op->listxattr) {
encoded_list = list;
lock_inode(lower_dentry->d_inode);
/* lock_kernel() already done by caller. */
err = lower_dentry->d_inode->i_op->listxattr(lower_dentry, encoded_list, size);
/* unlock_kernel() will be done by caller. */
unlock_inode(lower_dentry->d_inode);
}
out:
print_exit_status(err);
return err;
}
示例6: base0fs_setattr
STATIC int
base0fs_setattr(struct dentry *dentry, struct iattr *ia)
{
int err = 0;
struct dentry *lower_dentry;
inode_t *inode;
inode_t *lower_inode;
print_entry_location();
lower_dentry = base0fs_lower_dentry(dentry);
inode = dentry->d_inode;
lower_inode = INODE_TO_LOWER(inode);
fist_checkinode(inode, "base0fs_setattr");
err = notify_change(lower_dentry,
#ifdef HAVE_3_ARG_NOTIFY_CHANGE
DENTRY_TO_LVFSMNT(dentry),
#endif
ia);
#if defined(FIST_FILTER_DATA) || defined(FIST_FILTER_SCA)
out:
#endif /* FIST_FILTER_DATA || FIST_FILTER_SCA */
/*
* The lower file system might has changed the attributes, even if
* notify_change above resulted in an error(!) so we copy the
* lower_inode's attributes (and a few more) to our inode.
*/
fist_copy_attr_all(inode, lower_inode);
fist_checkinode(inode, "post base0fs_setattr");
print_exit_status(err);
return err;
}
示例7: kdb3fs_d_release
void
kdb3fs_d_release(dentry_t *dentry)
{
dentry_t *hidden_dentry;
print_entry_location();
#if 0
fist_print_dentry("kdb3fs_d_release IN dentry", dentry);
/* this could be a negative dentry, so check first */
if (!dtopd(dentry)) {
fist_dprint(6, "dentry without private data: %*s", dentry->d_name.len, dentry->d_name.name);
goto out;
}
hidden_dentry = dtohd(dentry);
fist_print_dentry("kdb3fs_d_release IN hidden_dentry", hidden_dentry);
if (hidden_dentry->d_inode)
fist_dprint(6, "kdb3fs_d_release: hidden_inode->i_count %d, i_num %lu.\n",
atomic_read(&hidden_dentry->d_inode->i_count),
hidden_dentry->d_inode->i_ino);
/* free private data (kdb3fs_dentry_info) here */
KFREE(dtopd(dentry));
dtopd(dentry) = NULL; /* just to be safe */
/* decrement hidden dentry's counter and free its inode */
dput(hidden_dentry);
#endif
out:
print_exit_location();
}
示例8: base0fs_vm_close
STATIC void
base0fs_vm_close(vm_area_t *vma)
{
vm_area_t *lower_vma;
file_t *file;
file_t *lower_file = NULL;
print_entry_location();
lower_vma = VMA_TO_LOWER(vma);
file = vma->vm_file;
if (FILE_TO_PRIVATE(file) != NULL)
lower_file = FILE_TO_LOWER(file);
BUG_ON(!lower_file);
fist_dprint(6, "VM_CLOSE1: file 0x%x, lower_file 0x%x, file->f_count %d, lower_file->f_count %d\n",
(int) file, (int) lower_file,
(int) atomic_read(&file->f_count),
(int) atomic_read(&lower_file->f_count));
BUG_ON(!lower_vma);
if (lower_vma->vm_ops->close)
lower_vma->vm_ops->close(lower_vma);
fput(lower_file);
KFREE(lower_vma);
VMA_TO_LOWER(vma) = NULL;
fist_dprint(6, "VM_CLOSE2: file 0x%x, lower_file 0x%x, file->f_count %d, lower_file->f_count %d\n",
(int) file, (int) lower_file,
(int) atomic_read(&file->f_count),
(int) atomic_read(&lower_file->f_count));
print_exit_location();
}
示例9: base0fs_vm_shared_unmap
STATIC void
base0fs_vm_shared_unmap(vm_area_t *vma, unsigned long start, size_t len)
{
vm_area_t *lower_vma;
file_t *file;
file_t *lower_file = NULL;
print_entry_location();
lower_vma = VMA_TO_LOWER(vma);
file = vma->vm_file;
if (FILE_TO_PRIVATE(file) != NULL)
lower_file = FILE_TO_LOWER(file);
BUG_ON(!lower_file);
fist_dprint(6, "VM_S_UNMAP1: file 0x%x, lower_file 0x%x, file->f_count %d, lower_file->f_count %d\n",
(int) file, (int) lower_file,
(int) atomic_read(&file->f_count),
(int) atomic_read(&lower_file->f_count));
/*
* call sync (filemap_sync) because the default filemap_unmap
* calls it too.
*/
filemap_sync(vma, start, len, MS_ASYNC);
if (lower_vma->vm_ops->unmap)
lower_vma->vm_ops->unmap(lower_vma, start, len);
fist_dprint(6, "VM_S_UNMAP2: file 0x%x, lower_file 0x%x, file->f_count %d, lower_file->f_count %d\n",
(int) file, (int) lower_file,
(int) atomic_read(&file->f_count),
(int) atomic_read(&lower_file->f_count));
print_exit_location();
}
示例10: kdb3fs_d_delete
int
kdb3fs_d_delete(dentry_t *dentry)
{
dentry_t *hidden_dentry;
int err = 0;
print_entry_location();
#if 0
/* this could be a negative dentry, so check first */
if (!dtopd(dentry)) {
fist_dprint(6, "dentry without private data: %*s", dentry->d_name.len, dentry->d_name.name);
goto out;
}
if (!(hidden_dentry = dtohd(dentry))) {
fist_dprint(6, "dentry without hidden_dentry: %*s", dentry->d_name.len, dentry->d_name.name);
goto out;
}
// fist_print_dentry("D_DELETE IN", dentry);
/* added b/c of changes to dput(): it calls d_drop on us */
if (hidden_dentry->d_op &&
hidden_dentry->d_op->d_delete) {
err = hidden_dentry->d_op->d_delete(hidden_dentry);
}
#endif
out:
print_exit_status(err);
return err;
}
示例11: unionfs_poll
static unsigned int unionfs_poll(struct file *file, poll_table * wait)
{
unsigned int mask = DEFAULT_POLLMASK;
struct file *hidden_file = NULL;
print_entry_location();
if (unionfs_file_revalidate(file, 0)) {
/* We should pretend an error happend. */
mask = POLLERR | POLLIN | POLLOUT;
goto out;
}
if (ftopd(file) != NULL)
hidden_file = ftohf(file);
if (!hidden_file->f_op || !hidden_file->f_op->poll)
goto out;
mask = hidden_file->f_op->poll(hidden_file, wait);
out:
print_exit_status(mask);
return mask;
}
示例12: base0fs_permission
STATIC int
base0fs_permission(inode_t *inode, int mask, struct nameidata* nd)
{
inode_t *lower_inode;
int err;
struct dentry *lower_dentry;
struct vfsmount *lower_mount;
FIST_ND_DECLARATIONS;
print_entry_location();
lower_inode = INODE_TO_LOWER(inode);
if(nd)
{
BUG_ON(!NAMEIDATA_TO_DENTRY(nd)); /* needed to find lower_dentry */
lower_dentry = base0fs_lower_dentry(NAMEIDATA_TO_DENTRY(nd));
lower_mount = DENTRY_TO_LVFSMNT(NAMEIDATA_TO_DENTRY(nd));
BUG_ON(!SUPERBLOCK_TO_PRIVATE(NAMEIDATA_TO_DENTRY(nd)->d_sb)); /* needed in FIST_ND_SAVE_ARGS macro */
FIST_ND_SAVE_ARGS(NAMEIDATA_TO_DENTRY(nd), lower_dentry, lower_mount);
}
err = permission(lower_inode, mask, nd);
if(nd)
{
FIST_ND_RESTORE_ARGS;
}
out:
print_exit_status(err);
return err;
}
示例13: kdb3fs_d_iput
/*
* we don't really need kdb3fs_d_iput, because dentry_iput will call iput() if
* kdb3fs_d_iput is not defined. We left this implemented for ease of
* tracing/debugging.
*/
void
kdb3fs_d_iput(dentry_t *dentry, inode_t *inode)
{
print_entry_location();
iput(inode);
print_exit_location();
}
示例14: unionfs_read
ssize_t unionfs_read(struct file * file, char *buf, size_t count, loff_t * ppos)
{
int err = -EINVAL;
struct file *hidden_file = NULL;
loff_t pos = *ppos;
print_entry_location();
if ((err = unionfs_file_revalidate(file, 0)))
goto out;
fist_print_file("entering read()", file);
PASSERT(ftopd(file));
hidden_file = ftohf(file);
PASSERT(hidden_file);
if (!hidden_file->f_op || !hidden_file->f_op->read)
goto out;
err = hidden_file->f_op->read(hidden_file, buf, count, &pos);
*ppos = pos;
if (err >= 0) {
/* atime should also be updated for reads of size zero or more */
fist_copy_attr_atime(file->f_dentry->d_inode,
hidden_file->f_dentry->d_inode);
}
memcpy(&(file->f_ra), &(hidden_file->f_ra),
sizeof(struct file_ra_state));
out:
fist_print_file("leaving read()", file);
print_exit_status(err);
return err;
}
示例15: unionfs_ioctl_branchcount
int unionfs_ioctl_branchcount(struct file *file, unsigned int cmd,
unsigned long arg)
{
int err = 0;
int bstart, bend;
int i;
struct super_block *sb = file->f_dentry->d_sb;
print_entry_location();
bstart = sbstart(sb);
bend = sbend(sb);
err = bend + 1;
if (!arg)
goto out;
for (i = bstart; i <= bend; i++) {
if (put_user(branch_count(sb, i), ((int *)arg) + i)) {
err = -EFAULT;
goto out;
}
}
out:
print_exit_status(err);
return err;
}