aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto97 <albertop2197@gmail.com>2017-05-23 21:47:00 +0200
committersayeed99 <sayeed.afridi2009@gmail.com>2017-07-23 12:28:30 +0530
commite41a917f157910afeb416d18f35b5be95b160c5f (patch)
tree90fb91d52d1f445c8e70237db7094dec69984243
parentbb34d168d5d81e1a2caa7527d6b76e12fa2dbb86 (diff)
fs: readdir: Fix su hide patch for non-iterate filesystemsHEADn7.1
* 3.10 doesn't normally use iterate for filesystems, but it was backported in hopes of removing vfs_readdir() * Because the romnt variable was only set for filesystems using iterate, the su hide patches were broken for many filesytems like ext4, which still use vfs_readdir() instead of iterate_dir() like their mainline counterparts * Remove the iterate check around setting romnt to fix this Change-Id: I26426683df0fd199a80f053294f352e31754bec5
-rw-r--r--fs/readdir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/readdir.c b/fs/readdir.c
index d52d18d9..b22bbbfa 100644
--- a/fs/readdir.c
+++ b/fs/readdir.c
@@ -37,9 +37,9 @@ int iterate_dir(struct file *file, struct dir_context *ctx)
res = -ENOENT;
if (!IS_DEADDIR(inode)) {
+ ctx->romnt = (inode->i_sb->s_flags & MS_RDONLY);
if (file->f_op->iterate) {
ctx->pos = file->f_pos;
- ctx->romnt = (inode->i_sb->s_flags & MS_RDONLY);
res = file->f_op->iterate(file, ctx);
file->f_pos = ctx->pos;
} else {