|
@@ -222,6 +222,13 @@ typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
|
|
#define ATTR_OPEN (1 << 15) /* Truncating from open(O_TRUNC) */
|
|
#define ATTR_OPEN (1 << 15) /* Truncating from open(O_TRUNC) */
|
|
#define ATTR_TIMES_SET (1 << 16)
|
|
#define ATTR_TIMES_SET (1 << 16)
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+ * Whiteout is represented by a char device. The following constants define the
|
|
|
|
+ * mode and device number to use.
|
|
|
|
+ */
|
|
|
|
+#define WHITEOUT_MODE 0
|
|
|
|
+#define WHITEOUT_DEV 0
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* This is the Inode Attributes structure, used for notify_change(). It
|
|
* This is the Inode Attributes structure, used for notify_change(). It
|
|
* uses the above definitions as flags, to know which values have changed.
|
|
* uses the above definitions as flags, to know which values have changed.
|
|
@@ -1398,6 +1405,7 @@ extern int vfs_link(struct dentry *, struct inode *, struct dentry *, struct ino
|
|
extern int vfs_rmdir(struct inode *, struct dentry *);
|
|
extern int vfs_rmdir(struct inode *, struct dentry *);
|
|
extern int vfs_unlink(struct inode *, struct dentry *, struct inode **);
|
|
extern int vfs_unlink(struct inode *, struct dentry *, struct inode **);
|
|
extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *, struct inode **, unsigned int);
|
|
extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *, struct inode **, unsigned int);
|
|
|
|
+extern int vfs_whiteout(struct inode *, struct dentry *);
|
|
|
|
|
|
/*
|
|
/*
|
|
* VFS dentry helper functions.
|
|
* VFS dentry helper functions.
|
|
@@ -1628,6 +1636,9 @@ struct super_operations {
|
|
#define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT)
|
|
#define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT)
|
|
#define IS_NOSEC(inode) ((inode)->i_flags & S_NOSEC)
|
|
#define IS_NOSEC(inode) ((inode)->i_flags & S_NOSEC)
|
|
|
|
|
|
|
|
+#define IS_WHITEOUT(inode) (S_ISCHR(inode->i_mode) && \
|
|
|
|
+ (inode)->i_rdev == WHITEOUT_DEV)
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* Inode state bits. Protected by inode->i_lock
|
|
* Inode state bits. Protected by inode->i_lock
|
|
*
|
|
*
|