[PATCH] ceph: don't set st_dev to 0 for stat(2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Zero st_dev confuses ls(1) code. it make 'ls -l' not print '+' sign
for file/directory with ACL.

Signed-off-by: "Yan, Zheng" <zyan@xxxxxxxxxx>
---
 fs/ceph/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index c6ec5aa46100..b5529b0b77a6 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -2244,7 +2244,7 @@ int ceph_getattr(const struct path *path, struct kstat *stat,
 		if (ceph_snap(inode) != CEPH_NOSNAP)
 			stat->dev = ceph_snap(inode);
 		else
-			stat->dev = 0;
+			stat->dev = 1; /* the smallest snapid is 2 */
 		if (S_ISDIR(inode->i_mode)) {
 			if (ceph_test_mount_opt(ceph_sb_to_client(inode->i_sb),
 						RBYTES))
-- 
2.13.6

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux