Return-Path: From: Martin Brandenburg To: hubcap@omnibond.com, linux-fsdevel@vger.kernel.org Cc: Martin Brandenburg , stable@vger.kernel.org Subject: [PATCH 3/3] orangefs: report attributes_mask and attributes for statx Date: Thu, 31 May 2018 16:37:00 +0000 Message-Id: <20180531163700.783-3-martin@omnibond.com> In-Reply-To: <20180531163700.783-1-martin@omnibond.com> References: <20180531163700.783-1-martin@omnibond.com> Sender: stable-owner@vger.kernel.org List-ID: OrangeFS formerly failed to set attributes_mask with the result that software could not see immutable and append flags present in the filesystem. Reported-by: Becky Ligon Signed-off-by: Martin Brandenburg Fixes: 68a24a6cc4a6 ("orangefs: implement statx") Cc: stable@vger.kernel.org Cc: hubcap@omnibond.com --- fs/orangefs/inode.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index b583fbf90665..f301e4957659 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c @@ -268,6 +268,13 @@ int orangefs_getattr(const struct path *path, struct kstat *stat, else stat->result_mask = STATX_BASIC_STATS & ~STATX_SIZE; + + stat->attributes_mask = STATX_ATTR_IMMUTABLE | + STATX_ATTR_APPEND; + if (inode->i_flags & S_IMMUTABLE) + stat->attributes |= STATX_ATTR_IMMUTABLE; + if (inode->i_flags & S_APPEND) + stat->attributes |= STATX_ATTR_APPEND; } return ret; } -- 2.14.3