lkml.org 
[lkml]   [2010]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] overlayfs: ovl_copy_up_xattr -- handle EOPNOTSUPP from vfs_listxattr
Date
Even when an underlying filesystem had a getxattr op it may not support
xattrs. In this case vfs_listxattr will return EOPNOTSUPP. Handle
this return when copying up attributes.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
fs/overlayfs/overlayfs.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/fs/overlayfs/overlayfs.c b/fs/overlayfs/overlayfs.c
index 6b8a7b9..1148b8c 100644
--- a/fs/overlayfs/overlayfs.c
+++ b/fs/overlayfs/overlayfs.c
@@ -692,8 +692,11 @@ static int ovl_copy_up_xattr(struct dentry *old, struct dentry *new)
return 0;

list_size = vfs_listxattr(old, NULL, 0);
- if (list_size <= 0)
+ if (list_size <= 0) {
+ if (list_size == -EOPNOTSUPP)
+ return 0;
return list_size;
+ }

buf = kzalloc(list_size, GFP_KERNEL);
if (!buf)
--
1.7.0.4


\
 
 \ /
  Last update: 2010-11-17 18:41    [W:0.060 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site