diff options
Diffstat (limited to 'fs/overlayfs/util.c')
-rw-r--r-- | fs/overlayfs/util.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c index 0d45a84468d2..260b215852a3 100644 --- a/fs/overlayfs/util.c +++ b/fs/overlayfs/util.c | |||
@@ -176,6 +176,35 @@ void ovl_dentry_set_opaque(struct dentry *dentry, bool opaque) | |||
176 | oe->opaque = opaque; | 176 | oe->opaque = opaque; |
177 | } | 177 | } |
178 | 178 | ||
179 | bool ovl_redirect_dir(struct super_block *sb) | ||
180 | { | ||
181 | struct ovl_fs *ofs = sb->s_fs_info; | ||
182 | |||
183 | return ofs->config.redirect_dir; | ||
184 | } | ||
185 | |||
186 | void ovl_clear_redirect_dir(struct super_block *sb) | ||
187 | { | ||
188 | struct ovl_fs *ofs = sb->s_fs_info; | ||
189 | |||
190 | ofs->config.redirect_dir = false; | ||
191 | } | ||
192 | |||
193 | const char *ovl_dentry_get_redirect(struct dentry *dentry) | ||
194 | { | ||
195 | struct ovl_entry *oe = dentry->d_fsdata; | ||
196 | |||
197 | return oe->redirect; | ||
198 | } | ||
199 | |||
200 | void ovl_dentry_set_redirect(struct dentry *dentry, const char *redirect) | ||
201 | { | ||
202 | struct ovl_entry *oe = dentry->d_fsdata; | ||
203 | |||
204 | kfree(oe->redirect); | ||
205 | oe->redirect = redirect; | ||
206 | } | ||
207 | |||
179 | void ovl_dentry_update(struct dentry *dentry, struct dentry *upperdentry) | 208 | void ovl_dentry_update(struct dentry *dentry, struct dentry *upperdentry) |
180 | { | 209 | { |
181 | struct ovl_entry *oe = dentry->d_fsdata; | 210 | struct ovl_entry *oe = dentry->d_fsdata; |