Lines Matching +full:segment +full:- +full:no +full:- +full:remap
1 /* SPDX-License-Identifier: GPL-2.0 */
15 #include <linux/radix-tree.h>
33 #include <linux/percpu-rwsem.h>
163 /* File is stream-like */
172 /* File is capable of returning -EAGAIN if I/O will block */
188 * Attribute flags. These should be or-ed together to figure out what
223 * Derek Atkins <warlord@MIT.EDU> 94-10-20
273 * enum positive_aop_returns - aop return codes with specific semantics
278 * to return the page to the active list -- it won't
331 /* non-RWF related bits - start at 16 */
335 /* iocb->ki_waitq is valid */
353 return kiocb->ki_complete == NULL; in is_sync_kiocb()
403 * struct address_space - Contents of a cacheable, mappable object.
407 * file offset->disk block mappings in the filesystem during invalidates.
412 * @nr_thps: Number of THPs in the pagecache (non-shmem only).
431 /* number of thp, only for non-shmem files */
461 return xa_marked(&mapping->i_pages, tag); in mapping_tagged()
466 down_write(&mapping->i_mmap_rwsem); in i_mmap_lock_write()
471 return down_write_trylock(&mapping->i_mmap_rwsem); in i_mmap_trylock_write()
476 up_write(&mapping->i_mmap_rwsem); in i_mmap_unlock_write()
481 return down_read_trylock(&mapping->i_mmap_rwsem); in i_mmap_trylock_read()
486 down_read(&mapping->i_mmap_rwsem); in i_mmap_lock_read()
491 up_read(&mapping->i_mmap_rwsem); in i_mmap_unlock_read()
496 lockdep_assert_held(&mapping->i_mmap_rwsem); in i_mmap_assert_locked()
501 lockdep_assert_held_write(&mapping->i_mmap_rwsem); in i_mmap_assert_write_locked()
509 return !RB_EMPTY_ROOT(&mapping->i_mmap.rb_root); in mapping_mapped()
518 * If i_mmap_writable is negative, no new writable mappings are allowed. You
523 return atomic_read(&mapping->i_mmap_writable) > 0; in mapping_writably_mapped()
528 return atomic_inc_unless_negative(&mapping->i_mmap_writable) ? in mapping_map_writable()
529 0 : -EPERM; in mapping_map_writable()
534 atomic_dec(&mapping->i_mmap_writable); in mapping_unmap_writable()
539 return atomic_dec_unless_positive(&mapping->i_mmap_writable) ? in mapping_deny_writable()
540 0 : -EBUSY; in mapping_deny_writable()
545 atomic_inc(&mapping->i_mmap_writable); in mapping_allow_writable()
549 * Use sequence counter to get consistent i_size on 32-bit processors.
554 #define i_size_ordered_init(inode) seqcount_init(&inode->i_size_seqcount)
560 #define ACL_NOT_CACHED ((void *)(-1))
563 * cache the ACL. This also means that ->get_acl() can be called in RCU mode
566 #define ACL_DONT_CACHE ((void *)(-3))
589 * Keep mostly read-only and often accessed (especially for
674 const struct file_operations *i_fop; /* former ->i_op->default_file_ops */
709 return (1 << node->i_blkbits); in i_blocksize()
714 return hlist_unhashed(&inode->i_hash); in inode_unhashed()
721 * will work fine and require no locking.
725 hlist_add_fake(&inode->i_hash); in inode_fake_hash()
729 * inode->i_mutex nesting subclasses for the lock validator:
735 * 4: second non-directory
739 * non-directories at once.
742 * parent[2] -> child -> grandchild -> normal -> xattr -> second non-directory
756 down_write(&inode->i_rwsem); in inode_lock()
761 up_write(&inode->i_rwsem); in inode_unlock()
766 down_read(&inode->i_rwsem); in inode_lock_shared()
771 up_read(&inode->i_rwsem); in inode_unlock_shared()
776 return down_write_trylock(&inode->i_rwsem); in inode_trylock()
781 return down_read_trylock(&inode->i_rwsem); in inode_trylock_shared()
786 return rwsem_is_locked(&inode->i_rwsem); in inode_is_locked()
791 down_write_nested(&inode->i_rwsem, subclass); in inode_lock_nested()
796 down_read_nested(&inode->i_rwsem, subclass); in inode_lock_shared_nested()
801 down_write(&mapping->invalidate_lock); in filemap_invalidate_lock()
806 up_write(&mapping->invalidate_lock); in filemap_invalidate_unlock()
811 down_read(&mapping->invalidate_lock); in filemap_invalidate_lock_shared()
817 return down_read_trylock(&mapping->invalidate_lock); in filemap_invalidate_trylock_shared()
823 up_read(&mapping->invalidate_lock); in filemap_invalidate_unlock_shared()
843 * and 64bit archs it makes no difference if preempt is enabled or not.
852 seq = read_seqcount_begin(&inode->i_size_seqcount); in i_size_read()
853 i_size = inode->i_size; in i_size_read()
854 } while (read_seqcount_retry(&inode->i_size_seqcount, seq)); in i_size_read()
860 i_size = inode->i_size; in i_size_read()
864 return inode->i_size; in i_size_read()
877 write_seqcount_begin(&inode->i_size_seqcount); in i_size_write()
878 inode->i_size = i_size; in i_size_write()
879 write_seqcount_end(&inode->i_size_seqcount); in i_size_write()
883 inode->i_size = i_size; in i_size_write()
886 inode->i_size = i_size; in i_size_write()
892 return MINOR(inode->i_rdev); in iminor()
897 return MAJOR(inode->i_rdev); in imajor()
902 struct pid *pid; /* pid or -pgrp where SIGIO should be sent */
909 * struct file_ra_state - Track a file's readahead state.
919 * When this structure is passed to ->readahead(), the "most recent"
936 return (index >= ra->start && in ra_has_index()
937 index < ra->start + ra->size); in ra_has_index()
990 atomic_long_inc(&f->f_count); in get_file()
993 #define get_file_rcu(x) atomic_long_inc_not_zero(&(x)->f_count)
994 #define file_count(x) atomic_long_read(&(x)->f_count)
996 #define MAX_NON_LFS ((1UL<<31) - 1)
1067 /* that will die - we need it for nfs_lock_info */
1092 * ->fl_blocker pointing here
1095 * ->fl_blocker->fl_blocked_requests
1119 int state; /* state of grant or error if -ve */
1134 #define INT_LIMIT(x) (~((x)1 << (sizeof(x)*8 - 1)))
1193 return -EINVAL; in fcntl_getlk()
1199 return -EACCES; in fcntl_setlk()
1206 return -EINVAL; in fcntl_getlk64()
1212 return -EACCES; in fcntl_setlk64()
1217 return -EINVAL; in fcntl_setlease()
1263 return -ENOLCK; in posix_lock_file()
1268 return -ENOENT; in locks_delete_block()
1279 return -ENOLCK; in vfs_lock_file()
1289 return -ENOLCK; in locks_lock_inode_wait()
1306 return -EINVAL; in generic_setlease()
1312 return -EINVAL; in vfs_setlease()
1318 return -EINVAL; in lease_modify()
1333 return f->f_inode; in file_inode()
1338 return d_real(file->f_path.dentry, file_inode(file)); in file_dentry()
1374 * sb->s_flags. Note that these mirror the equivalent MS_* flags where
1377 #define SB_RDONLY 1 /* Mount read-only */
1388 #define SB_INLINECRYPT (1<<17) /* Use blk-crypto for encrypted files */
1391 #define SB_LAZYTIME (1<<25) /* Update the on-disk [acm]times lazily */
1405 (sb->s_encoding_flags & SB_ENC_STRICT_MODE_FL)
1417 /* sb->s_iflags */
1418 #define SB_I_CGROUPWB 0x00000001 /* cgroup-aware writeback enabled */
1423 /* sb->s_iflags to limit user namespace mounts */
1429 #define SB_I_PERSB_BDI 0x00000200 /* has a per-sb bdi */
1440 SB_FREEZE_COMPLETE = 4, /* ->freeze_fs finished successfully */
1443 #define SB_FREEZE_LEVELS (SB_FREEZE_COMPLETE - 1)
1519 * The next field is for VFS *only*. No filesystems have any business
1525 * Filesystem subtype. If non-empty the filesystem type field
1532 struct shrinker s_shrink; /* per-sb shrinker handle */
1539 * inodes objects are currently double-accounted.
1543 /* Being remounted read-only */
1546 /* per-sb errseq_t for reporting writeback errors via syncfs */
1562 * of per-node lru lists, each of which has its own spinlock.
1563 * There is no need to put them into separate cachelines.
1587 return inode->i_sb->s_user_ns; in i_user_ns()
1597 return from_kuid(i_user_ns(inode), inode->i_uid); in i_uid_read()
1602 return from_kgid(i_user_ns(inode), inode->i_gid); in i_gid_read()
1607 inode->i_uid = make_kuid(i_user_ns(inode), uid); in i_uid_write()
1612 inode->i_gid = make_kgid(i_user_ns(inode), gid); in i_gid_write()
1616 * i_uid_into_mnt - map an inode's i_uid down into a mnt_userns
1620 * Note, this will eventually be removed completely in favor of the type-safe
1624 * If the inode's i_uid has no mapping INVALID_UID is returned.
1629 return AS_KUIDT(make_vfsuid(mnt_userns, i_user_ns(inode), inode->i_uid)); in i_uid_into_mnt()
1633 * i_uid_into_vfsuid - map an inode's i_uid down into a mnt_userns
1638 * If the inode's i_uid has no mapping INVALID_VFSUID is returned.
1643 return make_vfsuid(mnt_userns, i_user_ns(inode), inode->i_uid); in i_uid_into_vfsuid()
1647 * i_uid_needs_update - check whether inode's i_uid needs to be updated
1661 return ((attr->ia_valid & ATTR_UID) && in i_uid_needs_update()
1662 !vfsuid_eq(attr->ia_vfsuid, in i_uid_needs_update()
1667 * i_uid_update - update @inode's i_uid field
1679 if (attr->ia_valid & ATTR_UID) in i_uid_update()
1680 inode->i_uid = from_vfsuid(mnt_userns, i_user_ns(inode), in i_uid_update()
1681 attr->ia_vfsuid); in i_uid_update()
1685 * i_gid_into_mnt - map an inode's i_gid down into a mnt_userns
1689 * Note, this will eventually be removed completely in favor of the type-safe
1693 * If the inode's i_gid has no mapping INVALID_GID is returned.
1698 return AS_KGIDT(make_vfsgid(mnt_userns, i_user_ns(inode), inode->i_gid)); in i_gid_into_mnt()
1702 * i_gid_into_vfsgid - map an inode's i_gid down into a mnt_userns
1707 * If the inode's i_gid has no mapping INVALID_VFSGID is returned.
1712 return make_vfsgid(mnt_userns, i_user_ns(inode), inode->i_gid); in i_gid_into_vfsgid()
1716 * i_gid_needs_update - check whether inode's i_gid needs to be updated
1730 return ((attr->ia_valid & ATTR_GID) && in i_gid_needs_update()
1731 !vfsgid_eq(attr->ia_vfsgid, in i_gid_needs_update()
1736 * i_gid_update - update @inode's i_gid field
1748 if (attr->ia_valid & ATTR_GID) in i_gid_update()
1749 inode->i_gid = from_vfsgid(mnt_userns, i_user_ns(inode), in i_gid_update()
1750 attr->ia_vfsgid); in i_gid_update()
1754 * inode_fsuid_set - initialize inode's i_uid field with callers fsuid
1764 inode->i_uid = mapped_fsuid(mnt_userns, i_user_ns(inode)); in inode_fsuid_set()
1768 * inode_fsgid_set - initialize inode's i_gid field with callers fsgid
1778 inode->i_gid = mapped_fsgid(mnt_userns, i_user_ns(inode)); in inode_fsgid_set()
1782 * fsuidgid_has_mapping() - check whether caller's fsuid/fsgid is mapped
1795 struct user_namespace *fs_userns = sb->s_user_ns; in fsuidgid_has_mapping()
1821 percpu_up_read(sb->s_writers.rw_sem + level-1); in __sb_end_write()
1826 percpu_down_read(sb->s_writers.rw_sem + level - 1); in __sb_start_write()
1831 return percpu_down_read_trylock(sb->s_writers.rw_sem + level - 1); in __sb_start_write_trylock()
1835 percpu_rwsem_acquire(&(sb)->s_writers.rw_sem[(lev)-1], 1, _THIS_IP_)
1837 percpu_rwsem_release(&(sb)->s_writers.rw_sem[(lev)-1], 1, _THIS_IP_)
1841 return lockdep_is_held_type(sb->s_writers.rw_sem + SB_FREEZE_WRITE - 1, 1); in sb_write_started()
1845 * sb_end_write - drop write access to a superblock
1857 * sb_end_pagefault - drop write access to a superblock from a page fault
1869 * sb_end_intwrite - drop write access to a superblock for internal fs purposes
1872 * Decrement fs-internal number of writers to the filesystem. Wake up possible
1881 * sb_start_write - get write access to a superblock
1885 * a page or an inode), it should embed the operation in a sb_start_write() -
1896 * -> i_mutex (write path, truncate, directory ops, ...)
1897 * -> s_umount (freeze_super, thaw_super)
1910 * sb_start_pagefault - get write access to a superblock from a page fault
1914 * operation into sb_start_pagefault() - sb_end_pagefault() pair to get
1926 * -> sb_start_pagefault
1934 * sb_start_intwrite - get write access to a superblock for internal fs purposes
1977 * struct renamedata - contains all information required for renaming
2042 * Return 'true' to keep going and 'false' if there are no more entries.
2074 * If it is called with len == 0 that means "remap to end of source file".
2077 * REMAP_FILE_DEDUP: only remap if contents identical (i.e. deduplicate)
2085 * the behavior of the remap operation. The changes must be made by the
2086 * implementation; the vfs remap helper functions can take advantage of them.
2193 return file->f_op->read_iter(kio, iter); in call_read_iter()
2199 return file->f_op->write_iter(kio, iter); in call_write_iter()
2204 return file->f_op->mmap(file, vma); in call_mmap()
2269 * Inode flags - they have no relation to superblock flags now
2273 #define S_APPEND (1 << 2) /* Append-only file */
2280 #define S_PRIVATE (1 << 9) /* Inode is fs-internal */
2282 #define S_AUTOMOUNT (1 << 11) /* Automount/referral quasi-directory */
2283 #define S_NOSEC (1 << 12) /* no suid or xattr security attributes */
2295 * Note that nosuid etc flags are inode-specific: setting some file-system
2304 * i_flags updated. Hence, i_flags no longer inherit the superblock mount
2305 * flags, so these have to be checked separately. -- rmk@arm.uk.linux.org
2307 #define __IS_FLG(inode, flg) ((inode)->i_sb->s_flags & (flg))
2309 static inline bool sb_rdonly(const struct super_block *sb) { return sb->s_flags & SB_RDONLY; } in sb_rdonly()
2310 #define IS_RDONLY(inode) sb_rdonly((inode)->i_sb)
2312 ((inode)->i_flags & S_SYNC))
2314 ((inode)->i_flags & (S_SYNC|S_DIRSYNC)))
2319 #define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA)
2320 #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND)
2321 #define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE)
2324 #define IS_DEADDIR(inode) ((inode)->i_flags & S_DEAD)
2325 #define IS_NOCMTIME(inode) ((inode)->i_flags & S_NOCMTIME)
2326 #define IS_SWAPFILE(inode) ((inode)->i_flags & S_SWAPFILE)
2327 #define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE)
2328 #define IS_IMA(inode) ((inode)->i_flags & S_IMA)
2329 #define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT)
2330 #define IS_NOSEC(inode) ((inode)->i_flags & S_NOSEC)
2331 #define IS_DAX(inode) ((inode)->i_flags & S_DAX)
2332 #define IS_ENCRYPTED(inode) ((inode)->i_flags & S_ENCRYPTED)
2333 #define IS_CASEFOLDED(inode) ((inode)->i_flags & S_CASEFOLD)
2334 #define IS_VERITY(inode) ((inode)->i_flags & S_VERITY)
2336 #define IS_WHITEOUT(inode) (S_ISCHR(inode->i_mode) && \
2337 (inode)->i_rdev == WHITEOUT_DEV)
2350 .ki_flags = filp->f_iocb_flags, in init_sync_kiocb()
2360 .ki_flags = kiocb_src->ki_flags, in kiocb_clone()
2361 .ki_ioprio = kiocb_src->ki_ioprio, in kiocb_clone()
2362 .ki_pos = kiocb_src->ki_pos, in kiocb_clone()
2367 * Inode state bits. Protected by inode->i_lock
2381 * I_DIRTY_DATASYNC Data-related inode changes pending. We keep track of
2401 * nearly-dead inodes.
2488 * located very nearby on-disk, e.g. in the same inode block. This returns true
2490 * i_lock, or at least later re-checking under i_lock.
2494 return (inode->i_state & (I_DIRTY_TIME | I_NEW | in inode_is_dirtytime_only()
2528 if (!(file->f_flags & O_NOATIME)) in file_accessed()
2529 touch_atime(&file->f_path); in file_accessed()
2567 #define MODULE_ALIAS_FS(NAME) MODULE_ALIAS("fs-" NAME)
2598 /* Alas, no aliases. Too much hassle with bringing module.h everywhere */
2600 (((fops) && try_module_get((fops)->owner) ? (fops) : NULL))
2602 do { if (fops) module_put((fops)->owner); } while(0)
2604 * This one is to be used *ONLY* from ->open() instances.
2605 * fops must be non-NULL, pinned down *and* module dependencies
2611 fops_put(__file->f_op); \
2612 BUG_ON(!(__file->f_op = (fops))); \
2642 * taken are done before checking i_flctx->flc_lease. Otherwise, we in break_lease()
2647 if (inode->i_flctx && !list_empty_careful(&inode->i_flctx->flc_lease)) in break_lease()
2656 * taken are done before checking i_flctx->flc_lease. Otherwise, we in break_deleg()
2661 if (inode->i_flctx && !list_empty_careful(&inode->i_flctx->flc_lease)) in break_deleg()
2671 if (ret == -EWOULDBLOCK && delegated_inode) { in try_break_deleg()
2691 if (inode->i_flctx && !list_empty_careful(&inode->i_flctx->flc_lease)) in break_layout()
2740 return mnt_user_ns(file->f_path.mnt); in file_mnt_user_ns()
2744 * is_idmapped_mnt - check whether a mount is mapped
2754 return mnt_user_ns(mnt) != mnt->mnt_sb->s_user_ns; in is_idmapped_mnt()
2771 return file_open_root(&(struct path){.mnt = mnt, .dentry = mnt->mnt_root}, in file_open_root_mnt()
2781 return dentry_open(&file->f_path, file->f_flags, file->f_cred); in file_clone_open()
2801 return finish_open(file, file->f_path.dentry, NULL); in finish_open_simple()
2826 /* Marks the bottom of the first segment of free char majors */
2828 /* Marks the top and bottom of the second segment of free char majors */
2855 /* Invalid inode operations -- fs/bad_inode.c */
2879 return (iocb->ki_flags & IOCB_DSYNC) || in iocb_is_dsync()
2880 IS_SYNC(iocb->ki_filp->f_mapping->host); in iocb_is_dsync()
2891 int ret = vfs_fsync_range(iocb->ki_filp, in generic_write_sync()
2892 iocb->ki_pos - count, iocb->ki_pos - 1, in generic_write_sync()
2893 (iocb->ki_flags & IOCB_SYNC) ? 0 : 1); in generic_write_sync()
2909 return -EINVAL; in bmap()
2924 return inode_permission(mnt_user_ns(path->mnt), in path_permission()
2925 d_inode(path->dentry), mask); in path_permission()
2932 return (inode->i_mode & S_IXUGO) || S_ISDIR(inode->i_mode); in execute_ok()
2937 return (inode->i_mode ^ mode) & S_IFMT; in inode_wrong_type()
2942 if (!S_ISREG(file_inode(file)->i_mode)) in file_start_write()
2944 sb_start_write(file_inode(file)->i_sb); in file_start_write()
2949 if (!S_ISREG(file_inode(file)->i_mode)) in file_start_write_trylock()
2951 return sb_start_write_trylock(file_inode(file)->i_sb); in file_start_write_trylock()
2956 if (!S_ISREG(file_inode(file)->i_mode)) in file_end_write()
2958 __sb_end_write(file_inode(file)->i_sb, SB_FREEZE_WRITE); in file_end_write()
2962 * This is used for regular files where some users -- especially the
2964 * VM_DENYWRITE -- cannot handle concurrent write (and maybe mmap
2965 * read-write shared) accesses.
2970 * allow_write_access() re-enables write access to a file.
2973 * 0: no write access, no denied write access
2974 * < 0: (-i_writecount) users that denied write access to the file.
2979 * use {get,deny}_write_access() - these functions check the sign and refuse
2984 return atomic_inc_unless_negative(&inode->i_writecount) ? 0 : -ETXTBSY; in get_write_access()
2989 return atomic_dec_unless_positive(&inode->i_writecount) ? 0 : -ETXTBSY; in deny_write_access()
2993 atomic_dec(&inode->i_writecount); in put_write_access()
2998 atomic_inc(&file_inode(file)->i_writecount); in allow_write_access()
3002 return atomic_read(&inode->i_writecount) > 0; in inode_is_open_for_write()
3008 BUG_ON(!atomic_read(&inode->i_readcount)); in i_readcount_dec()
3009 atomic_dec(&inode->i_readcount); in i_readcount_dec()
3013 atomic_inc(&inode->i_readcount); in i_readcount_inc()
3033 /* fs/dcache.c -- generic fs support functions */
3055 return !inode->i_nlink || inode_unhashed(inode); in generic_drop_inode()
3094 * Userspace may rely on the the inode number being non-zero. For example, glibc
3098 * _FILE_OFFSET_BITS=32 on a 64-bit kernel we'll only end up reading out the
3100 * _FILE_OFFSET_BITS=64, this may cause some harmless false-negatives, but
3125 return kmem_cache_alloc_lru(cache, &sb->s_inode_lru, gfp); in alloc_inode_sb()
3131 __insert_inode_hash(inode, inode->i_ino); in insert_inode_hash()
3137 if (!inode_unhashed(inode) && !hlist_fake(&inode->i_hash)) in remove_inode_hash()
3222 return __blockdev_direct_IO(iocb, inode, inode->i_sb->s_bdev, iter, in blockdev_direct_IO()
3230 * inode_dio_begin - signal start of a direct I/O requests
3238 atomic_inc(&inode->i_dio_count); in inode_dio_begin()
3242 * inode_dio_end - signal finish of a direct I/O requests
3250 if (atomic_dec_and_test(&inode->i_dio_count)) in inode_dio_end()
3251 wake_up_bit(&inode->i_state, __I_DIO_WAKEUP); in inode_dio_end()
3284 return (((loff_t)inode->i_blocks) << 9) + inode->i_bytes; in __inode_get_bytes()
3389 return vma->vm_file && IS_DAX(vma->vm_file->f_mapping->host); in vma_is_dax()
3396 if (!IS_ENABLED(CONFIG_FS_DAX) || !vma->vm_file) in vma_is_fsdax()
3400 inode = file_inode(vma->vm_file); in vma_is_fsdax()
3401 if (S_ISCHR(inode->i_mode)) in vma_is_fsdax()
3402 return false; /* device-dax */ in vma_is_fsdax()
3409 if (file->f_flags & O_APPEND) in iocb_flags()
3411 if (file->f_flags & O_DIRECT) in iocb_flags()
3413 if (file->f_flags & O_DSYNC) in iocb_flags()
3415 if (file->f_flags & __O_SYNC) in iocb_flags()
3424 /* make sure there's no overlap between RWF and private IOCB flags */ in kiocb_set_rw_flags()
3430 return -EOPNOTSUPP; in kiocb_set_rw_flags()
3433 if (!(ki->ki_filp->f_mode & FMODE_NOWAIT)) in kiocb_set_rw_flags()
3434 return -EOPNOTSUPP; in kiocb_set_rw_flags()
3441 ki->ki_flags |= kiocb_flags; in kiocb_set_rw_flags()
3453 spin_lock(&dentry->d_lock); in parent_ino()
3454 res = dentry->d_parent->d_inode->i_ino; in parent_ino()
3455 spin_unlock(&dentry->d_lock); in parent_ino()
3470 #define SIMPLE_TRANSACTION_LIMIT (PAGE_SIZE - sizeof(struct simple_transaction_argresp))
3490 * completely, no further read calls are possible until the file is opened
3544 if (!(dir->i_mode & S_ISVTX)) in check_sticky()
3552 if (!is_sxid(inode->i_mode) && (inode->i_sb->s_flags & SB_NOSEC)) in inode_has_no_xattr()
3553 inode->i_flags |= S_NOSEC; in inode_has_no_xattr()
3558 return inode == inode->i_sb->s_root->d_inode; in is_root_inode()
3565 return ctx->actor(ctx, name, namelen, ctx->pos, ino, type); in dir_emit()
3569 return ctx->actor(ctx, ".", 1, ctx->pos, in dir_emit_dot()
3570 file->f_path.dentry->d_inode->i_ino, DT_DIR); in dir_emit_dot()
3574 return ctx->actor(ctx, "..", 2, ctx->pos, in dir_emit_dotdot()
3575 parent_ino(file->f_path.dentry), DT_DIR); in dir_emit_dotdot()
3579 if (ctx->pos == 0) { in dir_emit_dots()
3582 ctx->pos = 1; in dir_emit_dots()
3584 if (ctx->pos == 1) { in dir_emit_dots()
3587 ctx->pos = 2; in dir_emit_dots()