Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 972b2c71 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits)
  reiserfs: Properly display mount options in /proc/mounts
  vfs: prevent remount read-only if pending removes
  vfs: count unlinked inodes
  vfs: protect remounting superblock read-only
  vfs: keep list of mounts for each superblock
  vfs: switch ->show_options() to struct dentry *
  vfs: switch ->show_path() to struct dentry *
  vfs: switch ->show_devname() to struct dentry *
  vfs: switch ->show_stats to struct dentry *
  switch security_path_chmod() to struct path *
  vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb
  vfs: trim includes a bit
  switch mnt_namespace ->root to struct mount
  vfs: take /proc/*/mounts and friends to fs/proc_namespace.c
  vfs: opencode mntget() mnt_set_mountpoint()
  vfs: spread struct mount - remaining argument of next_mnt()
  vfs: move fsnotify junk to struct mount
  vfs: move mnt_devname
  vfs: move mnt_list to struct mount
  vfs: switch pnode.h macros to struct mount *
  ...
parents 02550d61 c3aa0776
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -37,15 +37,15 @@ d_manage: no no yes (ref-walk) maybe

--------------------------- inode_operations --------------------------- 
prototypes:
	int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
	int (*create) (struct inode *,struct dentry *,umode_t, struct nameidata *);
	struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameid
ata *);
	int (*link) (struct dentry *,struct inode *,struct dentry *);
	int (*unlink) (struct inode *,struct dentry *);
	int (*symlink) (struct inode *,struct dentry *,const char *);
	int (*mkdir) (struct inode *,struct dentry *,int);
	int (*mkdir) (struct inode *,struct dentry *,umode_t);
	int (*rmdir) (struct inode *,struct dentry *);
	int (*mknod) (struct inode *,struct dentry *,int,dev_t);
	int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t);
	int (*rename) (struct inode *, struct dentry *,
			struct inode *, struct dentry *);
	int (*readlink) (struct dentry *, char __user *,int);
@@ -117,7 +117,7 @@ prototypes:
	int (*statfs) (struct dentry *, struct kstatfs *);
	int (*remount_fs) (struct super_block *, int *, char *);
	void (*umount_begin) (struct super_block *);
	int (*show_options)(struct seq_file *, struct vfsmount *);
	int (*show_options)(struct seq_file *, struct dentry *);
	ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
	ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
	int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t);
+1 −1
Original line number Diff line number Diff line
@@ -192,7 +192,7 @@ attribute value uses the store_attribute() method.
	struct configfs_attribute {
		char                    *ca_name;
		struct module           *ca_owner;
		mode_t                  ca_mode;
		umode_t                  ca_mode;
	};

When a config_item wants an attribute to appear as a file in the item's
+12 −12
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ described below will work.

The most general way to create a file within a debugfs directory is with:

    struct dentry *debugfs_create_file(const char *name, mode_t mode,
    struct dentry *debugfs_create_file(const char *name, umode_t mode,
				       struct dentry *parent, void *data,
				       const struct file_operations *fops);

@@ -53,13 +53,13 @@ actually necessary; the debugfs code provides a number of helper functions
for simple situations.  Files containing a single integer value can be
created with any of:

    struct dentry *debugfs_create_u8(const char *name, mode_t mode,
    struct dentry *debugfs_create_u8(const char *name, umode_t mode,
				     struct dentry *parent, u8 *value);
    struct dentry *debugfs_create_u16(const char *name, mode_t mode,
    struct dentry *debugfs_create_u16(const char *name, umode_t mode,
				      struct dentry *parent, u16 *value);
    struct dentry *debugfs_create_u32(const char *name, mode_t mode,
    struct dentry *debugfs_create_u32(const char *name, umode_t mode,
				      struct dentry *parent, u32 *value);
    struct dentry *debugfs_create_u64(const char *name, mode_t mode,
    struct dentry *debugfs_create_u64(const char *name, umode_t mode,
				      struct dentry *parent, u64 *value);

These files support both reading and writing the given value; if a specific
@@ -67,13 +67,13 @@ file should not be written to, simply set the mode bits accordingly. The
values in these files are in decimal; if hexadecimal is more appropriate,
the following functions can be used instead:

    struct dentry *debugfs_create_x8(const char *name, mode_t mode,
    struct dentry *debugfs_create_x8(const char *name, umode_t mode,
				     struct dentry *parent, u8 *value);
    struct dentry *debugfs_create_x16(const char *name, mode_t mode,
    struct dentry *debugfs_create_x16(const char *name, umode_t mode,
				      struct dentry *parent, u16 *value);
    struct dentry *debugfs_create_x32(const char *name, mode_t mode,
    struct dentry *debugfs_create_x32(const char *name, umode_t mode,
				      struct dentry *parent, u32 *value);
    struct dentry *debugfs_create_x64(const char *name, mode_t mode,
    struct dentry *debugfs_create_x64(const char *name, umode_t mode,
				      struct dentry *parent, u64 *value);

These functions are useful as long as the developer knows the size of the
@@ -81,7 +81,7 @@ value to be exported. Some types can have different widths on different
architectures, though, complicating the situation somewhat.  There is a
function meant to help out in one special case:

    struct dentry *debugfs_create_size_t(const char *name, mode_t mode,
    struct dentry *debugfs_create_size_t(const char *name, umode_t mode,
				         struct dentry *parent, 
					 size_t *value);

@@ -90,7 +90,7 @@ a variable of type size_t.

Boolean values can be placed in debugfs with:

    struct dentry *debugfs_create_bool(const char *name, mode_t mode,
    struct dentry *debugfs_create_bool(const char *name, umode_t mode,
				       struct dentry *parent, u32 *value);

A read on the resulting file will yield either Y (for non-zero values) or
@@ -105,7 +105,7 @@ this structure and function:
	unsigned long size;
    };

    struct dentry *debugfs_create_blob(const char *name, mode_t mode,
    struct dentry *debugfs_create_blob(const char *name, umode_t mode,
				       struct dentry *parent,
				       struct debugfs_blob_wrapper *blob);

+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ An attribute definition is simply:
struct attribute {
        char                    * name;
        struct module		*owner;
        mode_t                  mode;
        umode_t                 mode;
};


+4 −4
Original line number Diff line number Diff line
@@ -225,7 +225,7 @@ struct super_operations {
        void (*clear_inode) (struct inode *);
        void (*umount_begin) (struct super_block *);

        int (*show_options)(struct seq_file *, struct vfsmount *);
        int (*show_options)(struct seq_file *, struct dentry *);

        ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
        ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
@@ -341,14 +341,14 @@ This describes how the VFS can manipulate an inode in your
filesystem. As of kernel 2.6.22, the following members are defined:

struct inode_operations {
	int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
	int (*create) (struct inode *,struct dentry *, umode_t, struct nameidata *);
	struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
	int (*link) (struct dentry *,struct inode *,struct dentry *);
	int (*unlink) (struct inode *,struct dentry *);
	int (*symlink) (struct inode *,struct dentry *,const char *);
	int (*mkdir) (struct inode *,struct dentry *,int);
	int (*mkdir) (struct inode *,struct dentry *,umode_t);
	int (*rmdir) (struct inode *,struct dentry *);
	int (*mknod) (struct inode *,struct dentry *,int,dev_t);
	int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t);
	int (*rename) (struct inode *, struct dentry *,
			struct inode *, struct dentry *);
	int (*readlink) (struct dentry *, char __user *,int);
Loading