fs.h (e219aafe50fd546b8686582ddbafd24c3c2eda04) fs.h (b25472f9b96159cc0b9b7ed449448805973cd789)
1#ifndef _LINUX_FS_H
2#define _LINUX_FS_H
3
4#include <linux/linkage.h>
5#include <linux/wait.h>
6#include <linux/kdev_t.h>
7#include <linux/dcache.h>
8#include <linux/path.h>

--- 2277 unchanged lines hidden (view full) ---

2286{
2287 return 0;
2288}
2289
2290static inline void iterate_bdevs(void (*f)(struct block_device *, void *), void *arg)
2291{
2292}
2293
1#ifndef _LINUX_FS_H
2#define _LINUX_FS_H
3
4#include <linux/linkage.h>
5#include <linux/wait.h>
6#include <linux/kdev_t.h>
7#include <linux/dcache.h>
8#include <linux/path.h>

--- 2277 unchanged lines hidden (view full) ---

2286{
2287 return 0;
2288}
2289
2290static inline void iterate_bdevs(void (*f)(struct block_device *, void *), void *arg)
2291{
2292}
2293
2294static inline int sb_is_blkdev_sb(struct super_block *sb)
2294static inline bool sb_is_blkdev_sb(struct super_block *sb)
2295{
2295{
2296 return 0;
2296 return false;
2297}
2298#endif
2299extern int sync_filesystem(struct super_block *);
2300extern const struct file_operations def_blk_fops;
2301extern const struct file_operations def_chr_fops;
2302#ifdef CONFIG_BLOCK
2303extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long);
2304extern int blkdev_ioctl(struct block_device *, fmode_t, unsigned, unsigned long);

--- 61 unchanged lines hidden (view full) ---

2366#else
2367#define BLKDEV_MAJOR_HASH_SIZE 0
2368#endif
2369
2370extern void init_special_inode(struct inode *, umode_t, dev_t);
2371
2372/* Invalid inode operations -- fs/bad_inode.c */
2373extern void make_bad_inode(struct inode *);
2297}
2298#endif
2299extern int sync_filesystem(struct super_block *);
2300extern const struct file_operations def_blk_fops;
2301extern const struct file_operations def_chr_fops;
2302#ifdef CONFIG_BLOCK
2303extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long);
2304extern int blkdev_ioctl(struct block_device *, fmode_t, unsigned, unsigned long);

--- 61 unchanged lines hidden (view full) ---

2366#else
2367#define BLKDEV_MAJOR_HASH_SIZE 0
2368#endif
2369
2370extern void init_special_inode(struct inode *, umode_t, dev_t);
2371
2372/* Invalid inode operations -- fs/bad_inode.c */
2373extern void make_bad_inode(struct inode *);
2374extern int is_bad_inode(struct inode *);
2374extern bool is_bad_inode(struct inode *);
2375
2376#ifdef CONFIG_BLOCK
2377/*
2378 * return READ, READA, or WRITE
2379 */
2380#define bio_rw(bio) ((bio)->bi_rw & (RW_MASK | RWA_MASK))
2381
2382/*

--- 144 unchanged lines hidden (view full) ---

2527extern int do_pipe_flags(int *, int);
2528
2529extern int kernel_read(struct file *, loff_t, char *, unsigned long);
2530extern ssize_t kernel_write(struct file *, const char *, size_t, loff_t);
2531extern ssize_t __kernel_write(struct file *, const char *, size_t, loff_t *);
2532extern struct file * open_exec(const char *);
2533
2534/* fs/dcache.c -- generic fs support functions */
2375
2376#ifdef CONFIG_BLOCK
2377/*
2378 * return READ, READA, or WRITE
2379 */
2380#define bio_rw(bio) ((bio)->bi_rw & (RW_MASK | RWA_MASK))
2381
2382/*

--- 144 unchanged lines hidden (view full) ---

2527extern int do_pipe_flags(int *, int);
2528
2529extern int kernel_read(struct file *, loff_t, char *, unsigned long);
2530extern ssize_t kernel_write(struct file *, const char *, size_t, loff_t);
2531extern ssize_t __kernel_write(struct file *, const char *, size_t, loff_t *);
2532extern struct file * open_exec(const char *);
2533
2534/* fs/dcache.c -- generic fs support functions */
2535extern int is_subdir(struct dentry *, struct dentry *);
2536extern int path_is_under(struct path *, struct path *);
2535extern bool is_subdir(struct dentry *, struct dentry *);
2536extern bool path_is_under(struct path *, struct path *);
2537
2538extern char *file_path(struct file *, char *, int);
2539
2540#include <linux/err.h>
2541
2542/* needed for stackable file system support */
2543extern loff_t default_llseek(struct file *file, loff_t offset, int whence);
2544

--- 110 unchanged lines hidden (view full) ---

2655extern loff_t noop_llseek(struct file *file, loff_t offset, int whence);
2656extern loff_t no_llseek(struct file *file, loff_t offset, int whence);
2657extern loff_t vfs_setpos(struct file *file, loff_t offset, loff_t maxsize);
2658extern loff_t generic_file_llseek(struct file *file, loff_t offset, int whence);
2659extern loff_t generic_file_llseek_size(struct file *file, loff_t offset,
2660 int whence, loff_t maxsize, loff_t eof);
2661extern loff_t fixed_size_llseek(struct file *file, loff_t offset,
2662 int whence, loff_t size);
2537
2538extern char *file_path(struct file *, char *, int);
2539
2540#include <linux/err.h>
2541
2542/* needed for stackable file system support */
2543extern loff_t default_llseek(struct file *file, loff_t offset, int whence);
2544

--- 110 unchanged lines hidden (view full) ---

2655extern loff_t noop_llseek(struct file *file, loff_t offset, int whence);
2656extern loff_t no_llseek(struct file *file, loff_t offset, int whence);
2657extern loff_t vfs_setpos(struct file *file, loff_t offset, loff_t maxsize);
2658extern loff_t generic_file_llseek(struct file *file, loff_t offset, int whence);
2659extern loff_t generic_file_llseek_size(struct file *file, loff_t offset,
2660 int whence, loff_t maxsize, loff_t eof);
2661extern loff_t fixed_size_llseek(struct file *file, loff_t offset,
2662 int whence, loff_t size);
2663extern loff_t no_seek_end_llseek_size(struct file *, loff_t, int, loff_t);
2664extern loff_t no_seek_end_llseek(struct file *, loff_t, int);
2663extern int generic_file_open(struct inode * inode, struct file * filp);
2664extern int nonseekable_open(struct inode * inode, struct file * filp);
2665
2666#ifdef CONFIG_BLOCK
2667typedef void (dio_submit_t)(int rw, struct bio *bio, struct inode *inode,
2668 loff_t file_offset);
2669
2670enum {

--- 287 unchanged lines hidden (view full) ---

2958
2959#define __FMODE_EXEC ((__force int) FMODE_EXEC)
2960#define __FMODE_NONOTIFY ((__force int) FMODE_NONOTIFY)
2961
2962#define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE])
2963#define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \
2964 (flag & __FMODE_NONOTIFY)))
2965
2665extern int generic_file_open(struct inode * inode, struct file * filp);
2666extern int nonseekable_open(struct inode * inode, struct file * filp);
2667
2668#ifdef CONFIG_BLOCK
2669typedef void (dio_submit_t)(int rw, struct bio *bio, struct inode *inode,
2670 loff_t file_offset);
2671
2672enum {

--- 287 unchanged lines hidden (view full) ---

2960
2961#define __FMODE_EXEC ((__force int) FMODE_EXEC)
2962#define __FMODE_NONOTIFY ((__force int) FMODE_NONOTIFY)
2963
2964#define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE])
2965#define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \
2966 (flag & __FMODE_NONOTIFY)))
2967
2966static inline int is_sxid(umode_t mode)
2968static inline bool is_sxid(umode_t mode)
2967{
2968 return (mode & S_ISUID) || ((mode & S_ISGID) && (mode & S_IXGRP));
2969}
2970
2971static inline int check_sticky(struct inode *dir, struct inode *inode)
2972{
2973 if (!(dir->i_mode & S_ISVTX))
2974 return 0;

--- 55 unchanged lines hidden ---
2969{
2970 return (mode & S_ISUID) || ((mode & S_ISGID) && (mode & S_IXGRP));
2971}
2972
2973static inline int check_sticky(struct inode *dir, struct inode *inode)
2974{
2975 if (!(dir->i_mode & S_ISVTX))
2976 return 0;

--- 55 unchanged lines hidden ---