]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/adouble/ad_lock.c
Fix
[netatalk.git] / libatalk / adouble / ad_lock.c
index 6961930d4e3925babc3d8e4c26e0d78dd8506e9b..ecfc62bd555a17605e1c2ed853a7699f618367e4 100644 (file)
@@ -455,7 +455,7 @@ int ad_lock(struct adouble *ad, uint32_t eid, int locktype, off_t off, off_t len
     type = locktype;
     if (eid == ADEID_DFORK) {
         adf = &ad->ad_data_fork;
-        if ((type & ADLOCK_FILELOCK)) {
+        if ((ad->ad_vers == AD_VERSION2) && (type & ADLOCK_FILELOCK)) {
             if (ad_meta_fileno(ad) != -1) { /* META */
                 adf = ad->ad_mdp;
                 lock.l_start = df2off(off);