mirror of
https://github.com/gluster/glusterfs.git
synced 2026-02-06 18:48:16 +01:00
In addition to files glfs_open() and glfs_h_open() are capable of handling directory opens. But there are various other components like DHT and probably other client xlators which are tightly coupled to work with directory opens using just opendir. One such example is the case where fsetxattr() is called with a file descriptor opened for the directory using glfs_open() or glfs_h_open() resulting in EBADFD. Therefore we make a differentiation within these APIs to correctly call syncop_open() or syncop_opendir() for file and directory entries respectively to avoid any possible file descriptor errors. Credits: Xavi Hernandez <xhernandez@redhat.com> Signed-off-by: Anoop C S <anoopcs@cryptolab.net> Signed-off-by: Anoop C S <anoopcs@cryptolab.net>