Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
Remove two unneeded exports and make two symbols static in fs/mpage.c
Cleanup after commit 585d3bc06f
Trim includes of fdtable.h
Don't crap into descriptor table in binfmt_som
Trim includes in binfmt_elf
Don't mess with descriptor table in load_elf_binary()
Get rid of indirect include of fs_struct.h
New helper - current_umask()
check_unsafe_exec() doesn't care about signal handlers sharing
New locking/refcounting for fs_struct
Take fs_struct handling to new file (fs/fs_struct.c)
Get rid of bumping fs_struct refcount in pivot_root(2)
Kill unsharing fs_struct in __set_personality()
This commit is contained in:
@@ -332,22 +332,10 @@ extern int __set_page_dirty_buffers(struct page *page);
|
||||
|
||||
static inline void buffer_init(void) {}
|
||||
static inline int try_to_free_buffers(struct page *page) { return 1; }
|
||||
static inline int sync_blockdev(struct block_device *bdev) { return 0; }
|
||||
static inline int inode_has_buffers(struct inode *inode) { return 0; }
|
||||
static inline void invalidate_inode_buffers(struct inode *inode) {}
|
||||
static inline int remove_inode_buffers(struct inode *inode) { return 1; }
|
||||
static inline int sync_mapping_buffers(struct address_space *mapping) { return 0; }
|
||||
static inline void invalidate_bdev(struct block_device *bdev) {}
|
||||
|
||||
static inline struct super_block *freeze_bdev(struct block_device *sb)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline int thaw_bdev(struct block_device *bdev, struct super_block *sb)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_BLOCK */
|
||||
#endif /* _LINUX_BUFFER_HEAD_H */
|
||||
|
@@ -1741,6 +1741,8 @@ extern void drop_collected_mounts(struct vfsmount *);
|
||||
|
||||
extern int vfs_statfs(struct dentry *, struct kstatfs *);
|
||||
|
||||
extern int current_umask(void);
|
||||
|
||||
/* /sys/fs */
|
||||
extern struct kobject *fs_kobj;
|
||||
|
||||
@@ -1885,6 +1887,18 @@ extern int fsync_super(struct super_block *);
|
||||
extern int fsync_no_super(struct block_device *);
|
||||
#else
|
||||
static inline void bd_forget(struct inode *inode) {}
|
||||
static inline int sync_blockdev(struct block_device *bdev) { return 0; }
|
||||
static inline void invalidate_bdev(struct block_device *bdev) {}
|
||||
|
||||
static inline struct super_block *freeze_bdev(struct block_device *sb)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline int thaw_bdev(struct block_device *bdev, struct super_block *sb)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
extern const struct file_operations def_blk_fops;
|
||||
extern const struct file_operations def_chr_fops;
|
||||
|
@@ -4,12 +4,10 @@
|
||||
#include <linux/path.h>
|
||||
|
||||
struct fs_struct {
|
||||
atomic_t count; /* This usage count is used by check_unsafe_exec() for
|
||||
* security checking purposes - therefore it may not be
|
||||
* incremented, except by clone(CLONE_FS).
|
||||
*/
|
||||
int users;
|
||||
rwlock_t lock;
|
||||
int umask;
|
||||
int in_exec;
|
||||
struct path root, pwd;
|
||||
};
|
||||
|
||||
@@ -19,6 +17,8 @@ extern void exit_fs(struct task_struct *);
|
||||
extern void set_fs_root(struct fs_struct *, struct path *);
|
||||
extern void set_fs_pwd(struct fs_struct *, struct path *);
|
||||
extern struct fs_struct *copy_fs_struct(struct fs_struct *);
|
||||
extern void put_fs_struct(struct fs_struct *);
|
||||
extern void free_fs_struct(struct fs_struct *);
|
||||
extern void daemonize_fs_struct(void);
|
||||
extern int unshare_fs_struct(void);
|
||||
|
||||
#endif /* _LINUX_FS_STRUCT_H */
|
||||
|
@@ -22,6 +22,8 @@ struct proc_mounts {
|
||||
int event;
|
||||
};
|
||||
|
||||
struct fs_struct;
|
||||
|
||||
extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
|
||||
struct fs_struct *);
|
||||
extern void __put_mnt_ns(struct mnt_namespace *ns);
|
||||
|
@@ -11,21 +11,11 @@
|
||||
*/
|
||||
#ifdef CONFIG_BLOCK
|
||||
|
||||
struct mpage_data {
|
||||
struct bio *bio;
|
||||
sector_t last_block_in_bio;
|
||||
get_block_t *get_block;
|
||||
unsigned use_writepage;
|
||||
};
|
||||
|
||||
struct writeback_control;
|
||||
|
||||
struct bio *mpage_bio_submit(int rw, struct bio *bio);
|
||||
int mpage_readpages(struct address_space *mapping, struct list_head *pages,
|
||||
unsigned nr_pages, get_block_t get_block);
|
||||
int mpage_readpage(struct page *page, get_block_t get_block);
|
||||
int __mpage_writepage(struct page *page, struct writeback_control *wbc,
|
||||
void *data);
|
||||
int mpage_writepages(struct address_space *mapping,
|
||||
struct writeback_control *wbc, get_block_t get_block);
|
||||
int mpage_writepage(struct page *page, get_block_t *get_block,
|
||||
|
@@ -8,6 +8,7 @@ struct mnt_namespace;
|
||||
struct uts_namespace;
|
||||
struct ipc_namespace;
|
||||
struct pid_namespace;
|
||||
struct fs_struct;
|
||||
|
||||
/*
|
||||
* A structure to contain pointers to all per-process
|
||||
|
@@ -68,7 +68,7 @@ struct sched_param {
|
||||
#include <linux/smp.h>
|
||||
#include <linux/sem.h>
|
||||
#include <linux/signal.h>
|
||||
#include <linux/fs_struct.h>
|
||||
#include <linux/path.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/pid.h>
|
||||
@@ -97,6 +97,7 @@ struct futex_pi_state;
|
||||
struct robust_list_head;
|
||||
struct bio;
|
||||
struct bts_tracer;
|
||||
struct fs_struct;
|
||||
|
||||
/*
|
||||
* List of flags we want to share for kernel threads,
|
||||
|
Reference in New Issue
Block a user