[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180624142747.312427092@linuxfoundation.org>
Date: Sun, 24 Jun 2018 23:22:40 +0800
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Becky Ligon <ligon@...mson.edu>,
Martin Brandenburg <martin@...ibond.com>, hubcap@...ibond.com
Subject: [PATCH 4.16 59/64] orangefs: report attributes_mask and attributes for statx
4.16-stable review patch. If anyone has any objections, please let me know.
------------------
From: Martin Brandenburg <martin@...ibond.com>
commit 7f54910fa8dfe504f2e1563f4f6ddc3294dfbf3a upstream.
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 <ligon@...mson.edu>
Signed-off-by: Martin Brandenburg <martin@...ibond.com>
Fixes: 68a24a6cc4a6 ("orangefs: implement statx")
Cc: stable@...r.kernel.org
Cc: hubcap@...ibond.com
Signed-off-by: Mike Marshall <hubcap@...ibond.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
fs/orangefs/inode.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -269,6 +269,13 @@ int orangefs_getattr(const struct path *
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;
}
Powered by blists - more mailing lists