search for: d_inode

Displaying 20 results from an estimated 108 matches for "d_inode".

2010 Oct 25
2
[PATCH] Btrfs: allow subvol deletion by unprivileged user with -o user_subvol_rm_allowed
.... + * 9. We can''t remove a root or mountpoint. + * 10. We don''t allow removal of NFS sillyrenamed files; it''s handled by + * nfs_async_unlink(). + */ + +static int btrfs_may_delete(struct inode *dir,struct dentry *victim,int isdir) +{ + int error; + + if (!victim->d_inode) + return -ENOENT; + + BUG_ON(victim->d_parent->d_inode != dir); + audit_inode_child(victim, dir); + + error = inode_permission(dir, MAY_WRITE | MAY_EXEC); + if (error) + return error; + if (IS_APPEND(dir)) + return -EPERM; + if (btrfs_check_sticky(dir, victim->d_inode)|| + IS_APPEND(v...
2001 Mar 13
5
is this null block OK?
..._FREE(rd, sizeof(*rd)); write_unlock(&fd->fd_lock); EXIT; return; } static int presto_do_truncate(struct presto_file_set *fset, struct dentry *dentry, loff_t length, loff_t size_check) { struct inode *inode = dentry->d_inode; struct super_operations *op; int error; struct iattr newattrs; ENTRY; /* Not pretty: "inode->i_size" shouldn't really be "loff_t". */ if ((off_t) length < 0) return -EINVAL; down(&inode-&g...
2008 Aug 19
0
[PATCH] Reinstate '-osubvol=.' option to mount entire tree
...les changed, 19 insertions(+), 15 deletions(-) diff --git a/super.c b/super.c index 55f4d00..f7b3eac 100644 --- a/super.c +++ b/super.c @@ -451,21 +451,25 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags, s->s_flags |= MS_ACTIVE; } - mutex_lock(&s->s_root->d_inode->i_mutex); - root = lookup_one_len(subvol_name, s->s_root, strlen(subvol_name)); - mutex_unlock(&s->s_root->d_inode->i_mutex); - if (IS_ERR(root)) { - up_write(&s->s_umount); - deactivate_super(s); - error = PTR_ERR(root); - goto error; - } - if (!root->d_inode) { -...
2024 Oct 29
1
[PATCH 2/2] [v8] drm/nouveau: expose GSP-RM logging buffers via debugfs
...> + "failed to create %s debugfs entry\n", name); > > + return NULL; > > + } > > + > > + /* > > + * For some reason, debugfs_create_blob doesn't set the size of the > > + * dentry, so do that here. > > + */ > > + i_size_write(d_inode(dir), blob->size); > > I think debugfs entries typically don't need this. Do we need it? Yes. I submitted a patch to debugfs earlier this year that would fix it for all debugfs blobs, but it was rejected because I was asked to fix all of debugfs itself, which I wasn't willing to...
2002 Feb 14
1
[BUG] [PATCH]: handling bad inodes in 2.4.x kernels
...y bug that needs to get fixed. the bug is most likely in fs/namei.c, open_namei() - at least i fixed my machine here with this: --- linux-2.4.17-orig/fs/namei.c Wed Oct 17 23:46:29 2001 +++ linux-2.4.17-uml/fs/namei.c Fri Feb 8 02:53:36 2002 @@ -1052,6 +1052,11 @@ error = -ENOENT; if (!dentry->d_inode) goto exit_dput; + + error = -EIO; + if (is_bad_inode(dentry->d_inode)) + goto exit_dput; + if (dentry->d_inode->i_op && dentry->d_inode->i_op->follow_link) goto do_link; an open() does not make any sense on a bad inode so i see no reason for not breaking the branch at th...
2003 Jan 16
0
[PATCH] Using qstr in ext3_get_parent()
...probe(struct dentry *dentry, struct inode *dir, +dx_probe(struct qstr *entry, struct inode *dir, struct dx_hash_info *hinfo, struct dx_frame *frame_in, int *err) { unsigned count, indirect; @@ -328,8 +329,6 @@ u32 hash; frame->bh = NULL; - if (dentry) - dir = dentry->d_parent->d_inode; if (!(bh = ext3_bread (NULL,dir, 0, 0, err))) goto fail; root = (struct dx_root *) bh->b_data; @@ -345,8 +344,8 @@ } hinfo->hash_version = root->info.hash_version; hinfo->seed = EXT3_SB(dir->i_sb)->s_hash_seed; - if (dentry) - ext3fs_dirhash(dentry->d_name.name,...
2011 Apr 19
2
ocfs or configfs bug ?
Hi all, I have a bug with OCFS through configfs : to illustrate this, try : while true ; do ls -l /sys/kernel/config/cluster/ocfs2/heartbeat ; done& while true ; do echo 31> /sys/kernel/config/cluster/ocfs2/heartbeat/dead_threshold ; done& So, I have a kernel crash : BUG: unable to handle kernel NULL pointer dereference at 0000000000000040 IP: [<ffffffffa01fd214>]
2011 Apr 19
2
ocfs or configfs bug ?
Hi all, I have a bug with OCFS through configfs : to illustrate this, try : while true ; do ls -l /sys/kernel/config/cluster/ocfs2/heartbeat ; done& while true ; do echo 31> /sys/kernel/config/cluster/ocfs2/heartbeat/dead_threshold ; done& So, I have a kernel crash : BUG: unable to handle kernel NULL pointer dereference at 0000000000000040 IP: [<ffffffffa01fd214>]
2024 Oct 03
1
[PATCH 2/2] [v8] drm/nouveau: expose GSP-RM logging buffers via debugfs
...> + nvkm_error(&gsp->subdev, > + "failed to create %s debugfs entry\n", name); > + return NULL; > + } > + > + /* > + * For some reason, debugfs_create_blob doesn't set the size of the > + * dentry, so do that here. > + */ > + i_size_write(d_inode(dir), blob->size); I think debugfs entries typically don't need this. Do we need it? > + > + return dir; > +} > + > +/** > + * r535_gsp_libos_debugfs_init - create logging debugfs entries > + * @gsp: gsp pointer > + * > + * Create the debugfs entries. This expose...
2001 Sep 19
2
Coda and Ext3
Hi everyone, The Linux Coda drivers and the ext3 patches don't seem to get along very well, at least in Linux 2.4.7. I've got a stock 2.4.7 kernel with a patch applied to the USB drivers (for a sony digital camera; see http://www.sujal.net/tech/linux/ just a change in unusual_devs.h). After I applied the ext3 patches from http://www.uow.edu.au/~andrewm/linux/ext3/ . Basically,
2008 Jul 14
18
[git patches] Ocfs2 and Configfs updates for 2.6.27
I'm running a bit late with the e-mail this time around, but I think that's ok since there really isn't any major new features here - the bulk of the Ocfs2 update is bug fixes, or cleanups. The same goes for configfs. The only two things that could be described as features would be: - Sunil has updated Ocfs2 to provide even more live cluster locking information via debugfs. - Joel
2003 Feb 08
3
Bug moving file over link?
Can someone explain to me what is happening here: ~ $ touch foo ~ $ ln foo bar ~ $ ls foo bar bar foo ~ $ mv foo bar ~ $ ls foo bar bar foo I try to move a file over a hard linked copy of itself and the move fails, but there is no error. Is this the intended behavior? -- Ben Escoto
2009 Nov 03
2
[PATCH]] Btrfs: fix destroy snapshot to get the right parent dentry
...s/btrfs/ioctl.c @@ -741,7 +741,7 @@ out: static noinline int btrfs_ioctl_snap_destroy(struct file *file, void __user *arg) { - struct dentry *parent = fdentry(file); + struct dentry *parent = file->f_path.dentry->d_parent; struct dentry *dentry; struct inode *dir = parent->d_inode; struct inode *inode; @@ -793,9 +793,6 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, dest = BTRFS_I(inode)->root; mutex_lock(&inode->i_mutex); - err = d_invalidate(dentry); - if (err) - goto out_unlock; down_write(&root->fs_info->subvol_sem);...
2012 Jan 30
3
[PATCH] Btrfs: allow cloning ranges within the same file
...nge. - * - allow ranges within the same file to be cloned (provided - * they don''t overlap)? */ /* the destination must be opened for writing */ @@ -2247,8 +2245,6 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, src = src_file->f_dentry->d_inode; ret = -EINVAL; - if (src == inode) - goto out_fput; /* the src must be open for reading */ if (!(src_file->f_mode & FMODE_READ)) @@ -2282,9 +2278,11 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, if (inode < src) { mutex_lock_nested(&amp...
2024 Oct 30
1
[PATCH 2/2] [v9] drm/nouveau: expose GSP-RM logging buffers via debugfs
...reate %s debugfs entry\n", name); + return NULL; + } + + /* + * For some reason, debugfs_create_blob doesn't set the size of the + * dentry, so do that here. See [1] + * + * [1] https://lore.kernel.org/r/linux-fsdevel/20240207200619.3354549-1-ttabi at nvidia.com/ + */ + i_size_write(d_inode(dent), blob->size); + + return dent; +} + +/** + * r535_gsp_libos_debugfs_init - create logging debugfs entries + * @gsp: gsp pointer + * + * Create the debugfs entries. This exposes the log buffers to userspace so + * that an external tool can parse it. + * + * The 'logpmu' contains exc...
2011 Mar 31
3
[PATCH 1/3] VFS/ioctl: Add punching-hole support to ioctl().
...e l_start, l_len and l_whence fields of the 'struct space_resv' * are used here, rest are ignored. */ -int ioctl_preallocate(struct file *filp, void __user *argp) +int ioctl_preallocate(struct file *filp, void __user *argp, int mode) { struct inode *inode = filp->f_path.dentry->d_inode; struct space_resv sr; @@ -443,7 +443,7 @@ int ioctl_preallocate(struct file *filp, void __user *argp) return -EINVAL; } - return do_fallocate(filp, FALLOC_FL_KEEP_SIZE, sr.l_start, sr.l_len); + return do_fallocate(filp, mode, sr.l_start, sr.l_len); } static int file_ioctl(struct file...
2011 Mar 31
3
[PATCH 1/3] VFS/ioctl: Add punching-hole support to ioctl().
...e l_start, l_len and l_whence fields of the 'struct space_resv' * are used here, rest are ignored. */ -int ioctl_preallocate(struct file *filp, void __user *argp) +int ioctl_preallocate(struct file *filp, void __user *argp, int mode) { struct inode *inode = filp->f_path.dentry->d_inode; struct space_resv sr; @@ -443,7 +443,7 @@ int ioctl_preallocate(struct file *filp, void __user *argp) return -EINVAL; } - return do_fallocate(filp, FALLOC_FL_KEEP_SIZE, sr.l_start, sr.l_len); + return do_fallocate(filp, mode, sr.l_start, sr.l_len); } static int file_ioctl(struct file...
2009 Apr 06
0
[PATCH] ocfs2: Use nd_set_link().
...page); -static char *ocfs2_fast_symlink_getlink(struct inode *inode, - struct buffer_head **bh); - -/* get the link contents into pagecache */ -static char *ocfs2_page_getlink(struct dentry * dentry, - struct page **ppage) -{ - struct page * page; - struct address_space *mapping = dentry->d_inode->i_mapping; - page = read_mapping_page(mapping, 0, NULL); - if (IS_ERR(page)) - goto sync_fail; - *ppage = page; - return kmap(page); - -sync_fail: - return (char*)page; -} static char *ocfs2_fast_symlink_getlink(struct inode *inode, struct buffer_head **bh) @@ -128,40 +109,55 @@ out:...
2009 Jun 19
2
[PATCH] ocfs2: Update atime in splice read if necessary.
...ex 775ac34..95cba48 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2025,7 +2025,7 @@ static ssize_t ocfs2_file_splice_read(struct file *in, size_t len, unsigned int flags) { - int ret = 0; + int ret = 0, lock_level = 0; struct inode *inode = in->f_path.dentry->d_inode; mlog_entry("(0x%p, 0x%p, %u, '%.*s')\n", in, pipe, @@ -2036,12 +2036,12 @@ static ssize_t ocfs2_file_splice_read(struct file *in, /* * See the comment in ocfs2_file_aio_read() */ - ret = ocfs2_inode_lock(inode, NULL, 0); + ret = ocfs2_inode_lock_atime(inode, in->f_...
2010 Nov 19
5
[PATCH 1/1] Ocfs2: Teach 'coherency=full' O_DIRECT writes to correctly up_read i_alloc_sem.
...+), 2 deletions(-) diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index f1e962c..fd0713c 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -568,7 +568,7 @@ static void ocfs2_dio_end_io(struct kiocb *iocb, bool is_async) { struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode; - int level; + int level, coherency; /* this io's submitter should not have unlocked this before we could */ BUG_ON(!ocfs2_iocb_is_rw_locked(iocb)); @@ -576,7 +576,12 @@ static void ocfs2_dio_end_io(struct kiocb *iocb, ocfs2_iocb_clear_rw_locked(iocb); level = ocfs2_iocb_rw_locked_...