本文整理汇总了C++中print_entry_location函数的典型用法代码示例。如果您正苦于以下问题:C++ print_entry_location函数的具体用法?C++ print_entry_location怎么用?C++ print_entry_location使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_entry_location函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:emelski,项目名称:code.melski.net,代码行数:34,代码来源:inode.c
示例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;
}
开发者ID:emelski,项目名称:code.melski.net,代码行数:26,代码来源:inode.c
示例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();
}
开发者ID:BackupTheBerlios,项目名称:dss-svn,代码行数:32,代码来源:super.c
示例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;
}
开发者ID:emelski,项目名称:code.melski.net,代码行数:34,代码来源:inode.c
示例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;
}
开发者ID:emelski,项目名称:code.melski.net,代码行数:32,代码来源:inode.c
示例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;
}
开发者ID:emelski,项目名称:code.melski.net,代码行数:35,代码来源:inode.c
示例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();
}
开发者ID:dmeister,项目名称:kbdb,代码行数:30,代码来源:dentry.c
示例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();
}
开发者ID:emelski,项目名称:code.melski.net,代码行数:34,代码来源:vm_area.c
示例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();
}
开发者ID:emelski,项目名称:code.melski.net,代码行数:34,代码来源:vm_area.c
示例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;
}
开发者ID:dmeister,项目名称:kbdb,代码行数:30,代码来源:dentry.c
示例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;
}
开发者ID:BackupTheBerlios,项目名称:dss-svn,代码行数:25,代码来源:file.c
示例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;
}
开发者ID:emelski,项目名称:code.melski.net,代码行数:32,代码来源:inode.c
示例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();
}
开发者ID:dmeister,项目名称:kbdb,代码行数:12,代码来源:dentry.c
示例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;
}
开发者ID:BackupTheBerlios,项目名称:dss-svn,代码行数:35,代码来源:file.c
示例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;
}
开发者ID:BackupTheBerlios,项目名称:dss-svn,代码行数:28,代码来源:branchman.c
示例16: unionfs_fsync
static int unionfs_fsync(struct file *file, struct dentry *dentry, int datasync)
{
int err;
struct file *hidden_file = NULL;
print_entry_location();
if ((err = unionfs_file_revalidate(file, 1)))
goto out;
PASSERT(ftopd(file));
hidden_file = ftohf(file);
err = -EINVAL;
if (!hidden_file->f_op || !hidden_file->f_op->fsync)
goto out;
down(&hidden_file->f_dentry->d_inode->i_sem);
err = hidden_file->f_op->fsync(hidden_file, hidden_file->f_dentry,
datasync);
up(&hidden_file->f_dentry->d_inode->i_sem);
out:
print_exit_status(err);
return err;
}
开发者ID:BackupTheBerlios,项目名称:dss-svn,代码行数:26,代码来源:file.c
示例17: unionfs_mmap
/* FIST-LITE special version of mmap */
static int unionfs_mmap(struct file *file, struct vm_area_struct *vma)
{
int err = 0;
struct file *hidden_file = NULL;
int willwrite;
print_entry_location();
/* This might could be deferred to mmap's writepage. */
willwrite = ((vma->vm_flags | VM_SHARED | VM_WRITE) == vma->vm_flags);
if ((err = unionfs_file_revalidate(file, willwrite)))
goto out;
PASSERT(ftopd(file));
hidden_file = ftohf(file);
err = -ENODEV;
if (!hidden_file->f_op || !hidden_file->f_op->mmap)
goto out;
PASSERT(hidden_file);
PASSERT(hidden_file->f_op);
PASSERT(hidden_file->f_op->mmap);
vma->vm_file = hidden_file;
err = hidden_file->f_op->mmap(hidden_file, vma);
get_file(hidden_file); /* make sure it doesn't get freed on us */
fput(file); /* no need to keep extra ref on ours */
out:
print_exit_status(err);
return err;
}
开发者ID:BackupTheBerlios,项目名称:dss-svn,代码行数:34,代码来源:file.c
示例18: unionfs_file_readdir
static int unionfs_file_readdir(struct file *file, void *dirent,
filldir_t filldir)
{
int err = -ENOTDIR;
print_entry_location();
print_exit_status(err);
return err;
}
开发者ID:BackupTheBerlios,项目名称:dss-svn,代码行数:8,代码来源:file.c
示例19: KMALLOC
/* buf is allocated here, and freed when VFS calls our put_link method */
err = -ENOMEM;
buf = KMALLOC(len, GFP_KERNEL);
if (!buf)
goto out;
old_fs = get_fs();
set_fs(KERNEL_DS);
err = dentry->d_inode->i_op->readlink(dentry, buf, len);
set_fs(old_fs);
if (err < 0)
goto out_free;
buf[err] = 0; // terminate the buffer -- XXX still needed?
err = 0;
nd_set_link(nd,buf);
goto out;
out_free:
KFREE(buf);
out:
#if 0
if (err < 0) {
dput(nd->dentry);
printk("EZK follow_link() mnt_cnt %d\n",
(int) atomic_read(&nd->mnt->mnt_count));
mntput(nd->mnt);
}
#endif
print_exit_status(err);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
return err;
#else /* 2.6.13 or newer */
return ERR_PTR(err);
#endif /* 2.6.13 or newer */
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
void
base0fs_put_link(struct dentry *dentry, struct nameidata *nd)
#else /* 2.6.13 or newer */
void
base0fs_put_link(struct dentry *dentry, struct nameidata *nd, void* unused)
#endif /* 2.6.13 or newer */
{
print_entry_location();
KFREE(nd_get_link(nd));
print_exit_location();
}
开发者ID:emelski,项目名称:code.melski.net,代码行数:52,代码来源:inode.c
示例20: unionfs_delete_inode
/*
* we now define delete_inode, because there are two VFS paths that may
* destroy an inode: one of them calls clear inode before doing everything
* else that's needed, and the other is fine. This way we truncate the inode
* size (and its pages) and then clear our own inode, which will do an iput
* on our and the lower inode.
*/
static void unionfs_delete_inode(struct inode *inode)
{
print_entry_location();
fist_checkinode(inode, "unionfs_delete_inode IN");
inode->i_size = 0; /* every f/s seems to do that */
clear_inode(inode);
print_exit_location();
}
开发者ID:BackupTheBerlios,项目名称:dss-svn,代码行数:17,代码来源:super.c
注:本文中的print_entry_location函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论