int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) { int ret; if (scribe_resource_prepare()) return -ENOMEM; scribe_lock_inode_read(dentry->d_inode); ret = __vfs_getattr(mnt, dentry, stat); scribe_unlock(dentry->d_inode); return ret; }
int scribe_post_fget(struct files_struct *files, struct file *file, int lock_flags) { if (!lock_flags) return 0; scribe_unlock(files); if (!file) return 0; if (lock_file(file, lock_flags)) { current->scribe->was_file_locking_interrupted = true; return -EINTR; } return 0; }
void scribe_unlock_pid(pid_t pid) { scribe_unlock((void *)pid); }