From 3ca8dff63ff9fe088e36da813f196120587da127 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Sun, 25 Nov 2012 08:00:40 -0500 Subject: [PATCH] --- yaml --- r: 339469 b: refs/heads/master c: ccb5c001b3035ca470fe21424e439530ba838510 h: refs/heads/master i: 339467: 184f3c310fa6fe3ddfa88cb1eeb2f2d21861775e v: v3 --- [refs] | 2 +- trunk/fs/cifs/readdir.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 994efe01c538..9fe81cee0b57 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3c15b4cf5580658951115f85efb2dea6a1380999 +refs/heads/master: ccb5c001b3035ca470fe21424e439530ba838510 diff --git a/trunk/fs/cifs/readdir.c b/trunk/fs/cifs/readdir.c index 1c576e871366..64920920d908 100644 --- a/trunk/fs/cifs/readdir.c +++ b/trunk/fs/cifs/readdir.c @@ -137,6 +137,16 @@ cifs_fill_common_info(struct cifs_fattr *fattr, struct cifs_sb_info *cifs_sb) if (fattr->cf_cifsattrs & ATTR_READONLY) fattr->cf_mode &= ~S_IWUGO; + /* + * We of course don't get ACL info in FIND_FIRST/NEXT results, so + * mark it for revalidation so that "ls -l" will look right. It might + * be super-slow, but if we don't do this then the ownership of files + * may look wrong since the inodes may not have timed out by the time + * "ls" does a stat() call on them. + */ + if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) + fattr->cf_flags |= CIFS_FATTR_NEED_REVAL; + if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL && fattr->cf_cifsattrs & ATTR_SYSTEM) { if (fattr->cf_eof == 0) {